-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Recently I noticed that Universe GraphQL schema has changed a bit and new JSON scalar type as well as a default value were introduced. In the introspection JSON it looks like this:
{
"defaultValue" : "[]",
"description" : "array of {key: value} or 'string' where clauses",
"name" : "clauses",
"type" : {
"kind" : "SCALAR",
"name" : "JSON",
"ofType" : null
}
}Based on my understanding of the GraphQL spec, the default value [] is not compatible the the argument type. According to the GraphQL spec:
defaultValue may return a String encoding (using the GraphQL language) of the default value used by this input value in the condition a value is not provided at runtime. If this input value has no default value, returns null.
The argument type is a simple scalar value. This means that it can't have value like [] (the default value is described with GraphQL syntax, not JSON). I'm not sure how JSON scalar type is implemented internally, but if it is represented with a String literal, then the default value should be something like "defaultValue": "\"[]\"".
I was not 100% sure where to report this issue, so I decided to put it here. Would be great if somebody could look into it.