Skip to content
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

Error: Name "__id" must not begin with "__", which is reserved by GraphQL introspection. #321

Closed
skhro87 opened this issue Jan 26, 2017 · 4 comments

Comments

@skhro87
Copy link

skhro87 commented Jan 26, 2017

I have tried a lot of things but always get this error message when trying to connect with postgraphql to a postgres instance.

$postgraphql -c postgres://postgres:postgres@localhost:5432/postgres -s kitchen_sink

PostGraphQL server listening on port 5000 🚀

‣ Connected to Postgres instance postgres://localhost:5432/postgres
‣ Introspected Postgres schema(s) kitchen_sink
‣ GraphQL endpoint served at http://localhost:5000/graphql
‣ GraphiQL endpoint served at http://localhost:5000/graphiql


Error: Name __id must not begin with __, which is reserved by GraphQL introspection.
at assertValidName (/usr/lib/node_modules/postgraphql/node_modules/graphql/utilities/assertValidName.js:27:11)
at /usr/lib/node_modules/postgraphql/node_modules/graphql/type/definition.js:328:42
at Array.forEach (native)
at defineFieldMap (/usr/lib/node_modules/postgraphql/node_modules/graphql/type/definition.js:327:14)
at GraphQLInterfaceType.getFields (/usr/lib/node_modules/postgraphql/node_modules/graphql/type/definition.js:401:44)
at /usr/lib/node_modules/postgraphql/node_modules/graphql/type/schema.js:207:27
at typeMapReducer (/usr/lib/node_modules/postgraphql/node_modules/graphql/type/schema.js:219:7)
at Array.reduce (native)
at typeMapReducer (/usr/lib/node_modules/postgraphql/node_modules/graphql/type/schema.js:202:39)
at Array.reduce (native)

The installation of postgres is fresh.
I can connect using the same connection string via psql and also via other tools.
I tried with and without specifying the schema. I run the kitchen sink sql from here http://calebmer.com/postgraphql-docs/examples/kitchen-sink/

$uname -r
4.8.13-1-ARCH

$psql --version
psql (PostgreSQL) 9.6.1

$postgraphql --version
2.5.0

@benjie
Copy link
Member

benjie commented Jan 26, 2017

This relates to the newly released graphql 0.9.0 which broke our dependencies - see #319

Potential solutions: downgrade to graphql < 0.9 or try running postgraphql with --classic-ids

@skhro87
Copy link
Author

skhro87 commented Jan 26, 2017

ahhh! thanks a lot, it works with --classic-ids !

@benjie
Copy link
Member

benjie commented Jan 26, 2017

I'm leaving this open for others who find the same issue in the coming days until we get a fix out.

@calebmer
Copy link
Collaborator

Fixed in 3.0.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants