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

[Q] How and where to define a global directive? #295

Closed
orefalo opened this issue Jan 27, 2019 · 2 comments
Closed

[Q] How and where to define a global directive? #295

orefalo opened this issue Jan 27, 2019 · 2 comments

Comments

@orefalo
Copy link

orefalo commented Jan 27, 2019

type A {
id:ID! @unique
}

How can I defined the @unique directive so it's visible in ALL modules?

@ardatan
Copy link
Collaborator

ardatan commented Jan 27, 2019

Since every module has its own isolated schema, you need to have a common module with @unique. Then, import this common module wherever @unique is used.

@orefalo
Copy link
Author

orefalo commented Jan 28, 2019

works tks

@orefalo orefalo closed this as completed Jan 28, 2019
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