-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
EPIC: Directive support #760
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Hello, |
Hi, |
Hi, there. There are a few questions about directives. Commonly most about INPUT_FIELD_DEFINITION. It is marked with a check mark and its input object is a parent object.
directive @allowValueType (field: String!, allow: [ValueTypeAllow!]) on
INPUT_FIELD_DEFINITION |
FIELD_DEFINITION # <- have to add
enum ValueType {
ONE
TWO
}
input ValueTypeAllow {
valueType: ValueType!
allow: Boolean!
}
input InputValue {
name: String!
valueType: ValueType! @allowValueType (field: "valueType", allow: [
ValueTypeAllow{valueType: ONE, allow: true},
ValueTypeAllow{valueType: TWO, allow: true}
])
} However, it's okay with the 3rd point if the directive receives strings for example directive @allowValueType (field: String!, allow: [String!]) on
INPUT_FIELD_DEFINITION |
FIELD_DEFINITION # <- have to add
input InputValue {
name: String!
valueType: ValueType! @allowValueType (field: "valueType", allow: [
"ONE:true",
"TWO:true"
])
} There is repository that represents all of them https://github.com/logrusorgru/gqlif . It can be cloned and executed with mutation a($name: String!, $value: InputValue!) {
set (name: $name, value: $value) {name valueType}
} with {"name": "pew-pew", "value": {"name": "one", "valueType": "ONE"}} You will got the panic. Best regards. |
Have you found a patch yet? |
Here to track the status of directives
Execution directives
Schema directives
Schema field directives on subscriptions
obj is always nil for any root (Query, Mutation, Subscription)
next() returns a channel of the field type
The text was updated successfully, but these errors were encountered: