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

Use schemaDirectives in ApolloClient #166

Open
FabHof opened this issue Aug 19, 2019 · 0 comments
Open

Use schemaDirectives in ApolloClient #166

FabHof opened this issue Aug 19, 2019 · 0 comments
Labels
core Feature requests related to core functionality project-apollo-client (legacy) LEGACY TAG DO NOT USE

Comments

@FabHof
Copy link

FabHof commented Aug 19, 2019

I would like to use schemaDirectives in ApolloClient to be able to use schema directives in local schemas. (The same as it is possible with makeExecutableSchema).

new ApolloClient({
  cache: new InMemoryCache(),
  typeDevs,
  resolvers,
  schemaDirectives: {
    computed: computedDirective
  }
})

This would make it possible to use custom directive in local schemas.

Possible use:

  extend type User {
    fullName: String @computed(value: "$firstName $lastName")
  }

Is there any other way to use custom directives in local schemas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Feature requests related to core functionality project-apollo-client (legacy) LEGACY TAG DO NOT USE
Projects
None yet
Development

No branches or pull requests

2 participants