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

Scalar can be decorated with an undeclared directive #511

Closed
roaris opened this issue Mar 22, 2022 · 1 comment · Fixed by #527
Closed

Scalar can be decorated with an undeclared directive #511

roaris opened this issue Mar 22, 2022 · 1 comment · Fixed by #527

Comments

@roaris
Copy link
Contributor

roaris commented Mar 22, 2022

The schema below raise an error. name is decorated with an undeclared directive.

type User {
    name: String! @undeclareddirective
}
panic: graphql: directive "undeclareddirective" not found

But, the schema below does not raise an error. scalar S is decorated with an undeclared directive.

scalar S @undeclareddirective

Is this a bug?
The same is true not only for scalar, but also for argument, interface, etc.
The two schemas below also do not raise errors.

type Query {
    hello(name: String! @undeclareddirective): String!
}
interface I @undeclareddirective {
    name: String!
}
@roaris roaris changed the title Scalar can be decorated with a non-existent directive Scalar can be decorated with an undeclared directive Mar 22, 2022
@pavelnikolov
Copy link
Member

pavelnikolov commented Oct 11, 2022 via email

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 a pull request may close this issue.

2 participants