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

context-configured GET requests and serialization config #123

Closed
wants to merge 2 commits into from

Conversation

micimize
Copy link
Contributor

@micimize micimize commented Jul 26, 2020

This is a draft of functionality I added to make PersistedQueriesLink work in graphql_flutter v4:

  • Adds a HttpLinkMethod for context-based GET requests
  • Adds a RequestSerializationInclusions for configuring serialization

I'm pretty unsure about both APIs, but essentially PersistedQueriesLink wants to set GET in context and have a way to set includeQuery: false.

@micimize micimize changed the title gql_http_link: HttpLinkMethod for context-based GET requests context-configured GET requests and serialization config Jul 26, 2020
@micimize micimize closed this Sep 7, 2021
@brightchip
Copy link

Please how do I enable persisted queries ?
There's no PersistedQueriesLink in the graphql_flutter: ^5.0.1-beta.1.
This is a must feature for my project. How do I use it

@micimize
Copy link
Contributor Author

@brightchip I had a fairly complete (passed all tests) migration done in zino-hofmann/graphql-flutter#756 based on this code, but:

  1. I didn't like the RequestSerializationInclusions API here, and thought it needed to be refactored
  2. I didn't like the coupling to HttpLink when I think DioLink may be better in the long run.
  3. I think PersistedQueriesLink would be better as a standalone link.
  4. I stopped contributing to the ecosystem.

If you need this feature, my recommendation would be to:

  1. fork my changes here and re-PR them here, maybe figuring out a better way or doing the payload configuration
  2. copy the link from https://github.com/zino-app/graphql-flutter/pull/756/files into an independent package that depends on your fork with a git dependency.

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.

2 participants