Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Actix integration: cbor response support + error handling improvements #784

Merged
merged 3 commits into from
Jan 18, 2022

Conversation

Follpvosten
Copy link
Contributor

This PR does two things:

I'm not 100% sure if this PR is in a mergable state, I could feature-flag the whole cbor thing or split this up into two PRs if that's preferred.

I've also noticed that the cbor request implementation doesn't actually support the application/cbor mime type atm, the stated reason being that mime doesn't support it yet; however mime is unmaintained and will never add it, and also it's possible to match on (mime::APPLICATION, "cbor") without the crate needing to add support. That's definitely a separate PR however (and I don't need cbor requests, so I'm not sure if I'm the right person to implement that).

@sunli829
Copy link
Collaborator

Thank you! It would be nice to have serde_cbor as an optional feature. 🙂

@Follpvosten
Copy link
Contributor Author

Follpvosten commented Jan 17, 2022

Alright, a couple notes:

  • While I'm much more satisfied with this version, there might be some things which are still missing or could be improved
  • I've basically copied the add test and adjusted it to request cbor. Because serde_cbor doesn't have a macro like serde_json's json!, I've derived Deserialize on a struct for that.

@sunli829
Copy link
Collaborator

Nice, I'll merge it first and then refactor if necessary. I would like to move the cbor response to async-graphql so that all integrations can be easily supported.

@sunli829 sunli829 merged commit e5141b0 into async-graphql:master Jan 18, 2022
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.

None yet

2 participants