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

Enhancement: using schema directives #25

Open
tsubasax opened this issue Dec 11, 2020 · 3 comments
Open

Enhancement: using schema directives #25

tsubasax opened this issue Dec 11, 2020 · 3 comments

Comments

@tsubasax
Copy link

tsubasax commented Dec 11, 2020

How do we include custom schema directives in Config/apollo.ts ?

I'd like to implement them like below:

const config: ApolloConfig = {
  schemas: 'app/Schemas',
  resolvers: 'app/Resolvers',
  directives: 'app/Directives', // <- custom schema directives
  // and rest properties...
}
@targos
Copy link
Member

targos commented Dec 11, 2020

could you point to the documentation about how to set directives in apollo server?

@tsubasax
Copy link
Author

It can be found on this page of Apollo Docs:

https://www.apollographql.com/docs/apollo-server/schema/directives/#using-custom-schema-directives

Maybe we can use mergeDirectives method inplemented in @graphql-tools/merge:

https://www.graphql-tools.com/docs/api/modules/merge#mergedirectives

@yodosan
Copy link

yodosan commented Oct 26, 2021

Hi! Any news on this?
Or at least a workaround that allows adding a custom directive?

Thanks!

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

3 participants