Skip to content

Conversation

@sd2k
Copy link

@sd2k sd2k commented Oct 23, 2019

When finished, this should fix #426.

Hyper, Iron and Rocket integrations are working fine with tests. I can't for the life of me figure out how to get the warp integration working - any guidance there would be much appreciated!

@theduke
Copy link
Member

theduke commented Oct 31, 2019

Hey, thanks.

For warp, you would basically just need to adapt the warp::body::json method.

Something like this should work:

 ( warp::filters::header::exact(mime::APPLICATION, mime::JSON)
      .or( warp::filters::header::exact(...)
  )
  // Rest of the code of the json() function
  .and (...)

@sd2k
Copy link
Author

sd2k commented Oct 31, 2019

@theduke Ah sorry, I think I've managed to get the individual filters to compile fine (get_filter remains unchanged, post_filter has just been refactored into post_json_filter, and there's a new post_graphql_filter for handling Content-Type: application/graphql. I'm struggling to combine them correctly into a single BoxedFilter.

@tyranron
Copy link
Member

tyranron commented May 6, 2020

@sd2k why have you closed this? You have no time for finishing this?

@sd2k
Copy link
Author

sd2k commented May 6, 2020

@tyranron That's strange, I didn't close it intentionally, I just force rebased my branch on master. I still can't get the warp integration working though and don't think I'll have time to do so unfortunately, so if anyone is more experienced in warp and wants to take over that would be great.

@sd2k
Copy link
Author

sd2k commented May 6, 2020

Ah, I see, I accidentally removed the new commits from my fork when I rebased which closed this PR automatically. Looks like I'll need to create a new PR to get GitHub to recognise the new commits. Happy to do that although the warp changes still won't be there.

@tyranron
Copy link
Member

tyranron commented May 6, 2020

@sd2k if you don't mind I'll pick up your work and finish it in a separate PR.

@sd2k
Copy link
Author

sd2k commented May 6, 2020

@tyranron fine with me, go ahead 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support Content-Type: application/graphql

3 participants