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

Add @client To Query For User #3

Closed
dOrgJelli opened this issue Feb 13, 2020 · 2 comments
Closed

Add @client To Query For User #3

dOrgJelli opened this issue Feb 13, 2020 · 2 comments

Comments

@dOrgJelli
Copy link
Collaborator

Instead of making the user add @client as a directive to their mutation queries, we should add it for them if we know we're using a locaResolverExecutor. I think we should add the @client directive like so:

mutationExecutors/localResolver.ts

const localResolver = (...) => {
  const definitions = Array.from(mutationQuery.query.definitions.values())
  // add the @client directive here
  const query: DocumentNode = {
    kind: mutationQuery.query.kind,
    loc: mutationQuery.query.loc,
    definitions: 
  }
  ...
}
@Jannis
Copy link
Contributor

Jannis commented Feb 13, 2020

This is not what we should do. @client is entirely specific to Apollo and its withClientState. See this comment for what we (most likely) should do instead: #1 (comment)

@dOrgJelli
Copy link
Collaborator Author

Moved to: #11

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

No branches or pull requests

2 participants