You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
calls this scalar by the name ID, and not GlobalID.
I think that there is no mention of a custom scalar to be returned for object identification.
This leads to a lot of issues while working with client libraries such as relay, where directives expect the return type to be the scalar type of ID, and not GlobalID.
An example relay compiler error is shown below:
> [email protected] relay
> relay-compiler
[INFO] [default] compiling...
[ERROR] Error: ✖︎ Invalid use of @deleteEdge on field 'deletedTodoId'. Expected field type 'ID', got 'GlobalID'.
client/src/components/home-page/Todo.tsx:20:21
19 │ deleteTodo(todoId: $todoId) {
20 │ deletedTodoId @deleteEdge(connections: $connections)
│ ^^^^^^^^^^^
21 │ }
[ERROR] Compilation failed.
[ERROR] Unable to run relay compiler. Error details:
Failed to build:
- Validation errors: 1 error(s) encountered above.
Request to output the
ID
scalar instead ofGlobalID
, while generating the GraphQL schemaMy understanding is that
GlobalID
was meant to be an internal helper that resolves nodes, but ended up being a custom scalar.Feature Request Type
Description
Currently, while using the relay integration, and working with node types, like the example code below:
We get a schema output like this:
But in the relay specification, which the GlobalID scalar is based on:
https://relay.dev/graphql/objectidentification.htm
calls this scalar by the name
ID
, and notGlobalID
.I think that there is no mention of a custom scalar to be returned for object identification.
This leads to a lot of issues while working with client libraries such as relay, where directives expect the return type to be the scalar type of
ID
, and notGlobalID
.An example relay compiler error is shown below:
Output GraphQL schema (After requested change)
It would be nice if we could change the
GlobalID
scalar being generated toID
Upvote & Fund
The text was updated successfully, but these errors were encountered: