-
Notifications
You must be signed in to change notification settings - Fork 46
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
Add enum #45
Comments
@felipe-gustavo feel free to open a PR for this use case. |
@felipe-gustavo can you try the following command const gqlquery = query([
{
operation: "diagnostic__defects",
variables: {
page: {
value: 1
},
orderBy:{
list: true,
type: 'type your order input value here, defined in the schema',
value: {field: 'IS_FUNCTIONAL_DEFECT', order: 'DESC'}
}
},
fields: [{'data':['id','name']}]
},
]); |
@felipe-gustavo Atm there is no way to embed argument values directly, but hopefully the above will work, otherwise I'll send a PR to embed argument values directly without using variables |
Same here. |
To spare the sanity of anyone else who might resort to reading the graphql spec like me, no the graphql spec doesn't say that the server must accept strings in the variables transport for enum values. It specifically says it may accept strings. The relevant section is here: https://spec.graphql.org/October2021/#sec-Enums.Input-Coercion I think I have enough time today to implement a PR for this so I'm working on it now. |
i have some query that need add Enum like that:
IS_FUNCTIONAL_DEFECT and DESC are ENUM, can't be wrapped by quote
The text was updated successfully, but these errors were encountered: