Unable to load schema with query parameter enum default
See original GitHub issueSpectaql seems unable to parse schemas with enum query parameter defaults.
Given this schema as an example:
type Query {
records(sorting: [RecordSort!] = [{ direction: ASC }]): [Record]!
}
type Record {
id: ID!
name: ID!
}
input RecordSort {
direction: SortDirection!
}
enum SortDirection {
ASC
DESC
}
Spectaql fails with:
SyntaxError: JSON5: invalid character 'A' at 1:14
Putting quotes around ASC
is something of a workaround, but seems wrong given it’s not a String parameter.
Possibly related to #301?
Issue Analytics
- State:
- Created a year ago
- Comments:5
Top Results From Across the Web
Setting default value on an enum causes the default ...
Whenever a default is set on an enum parameter it becomes impossible to send another version than the default.
Read more >Swagger validation error when API uses enum
Status schema, query parameters in OpenAPI 2.0 cannot $ref schemas, so the enum must be defined in the status parameter directly.
Read more >Enums as Request Parameters in Spring Boot Rest
This article is about handling enums as request parameters in spring boot rest with annotations such as @PathVariable, @RequestParam and ...
Read more >Language Guide (proto3) | Protocol Buffers
For enums, the default value is the first defined enum value, which must be 0. For message fields, the field is not set....
Read more >11.6 Data Type Default Values
Subqueries, parameters, variables, stored functions, and loadable functions are not permitted. An expression default value cannot depend on a column that has ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Fixed and published under v
1.2.4
.You’re welcome