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
I'm trying to use postgraphile against a schema which has tables whose column names are UUIDs. When it tries to create the graphql schema I get errors like this:
Error: GraphQL schema is invalid:
- Name "__744A113D_1AFB_4EA3_A1D9_C318A1D6821B_ASC" must not begin with "__", which is reserved by GraphQL introspection.
- Name "__744A113D_1AFB_4EA3_A1D9_C318A1D6821B_DESC" must not begin with "__", which is reserved by GraphQL introspection.
This is unexpected, because the column name in question is, from postgres's point of view, "744a113d-1afb-4ea3-a1d9-c318a1d6821b". graphile seems to have automatically converted that into a name beginning with __, but then dies because names are not allowed to begin with __. This seems like a bug.
Steps to reproduce
Create a postgres database, create a schema with any name, create a table with any name which has a column with a uuid name.
Execute postgraphile against that schema.
Expected results
No error.
Actual results
Error: GraphQL schema is invalid:
- Name "__744A113D_1AFB_4EA3_A1D9_C318A1D6821B_ASC" must not begin with "__", which is reserved by GraphQL introspection.
- Name "__744A113D_1AFB_4EA3_A1D9_C318A1D6821B_DESC" must not begin with "__", which is reserved by GraphQL introspection.
Additional context
postgraphile 4.13.0
The text was updated successfully, but these errors were encountered:
In GraphQL, Name must start with _ or A-Za-z; since your names start with a number we're having to automatically prefix them with a single leading _. However, it looks like when this value is fed into the constantCase inflector, it is doubling the leading _.
Summary
I'm trying to use postgraphile against a schema which has tables whose column names are UUIDs. When it tries to create the graphql schema I get errors like this:
This is unexpected, because the column name in question is, from postgres's point of view,
"744a113d-1afb-4ea3-a1d9-c318a1d6821b"
. graphile seems to have automatically converted that into a name beginning with__
, but then dies because names are not allowed to begin with__
. This seems like a bug.Steps to reproduce
Expected results
No error.
Actual results
Additional context
postgraphile 4.13.0
The text was updated successfully, but these errors were encountered: