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
create type user_opinion as enum ('pro','cons');
create table user_view(id serial primary key,view user_opinion);
create table argument(id serial primary key,side user_opinion);
When I am trying to start postgraphql it gives me error:
Error: Schema must contain unique named types but contains multiple types named "UserOpinion".
at invariant (/usr/lib/node_modules/postgraphql/node_modules/graphql/jsutils/invariant.js:19:11)
at typeMapReducer (/usr/lib/node_modules/postgraphql/node_modules/graphql/type/schema.js:207:29)
at /usr/lib/node_modules/postgraphql/node_modules/graphql/type/schema.js:234:22
at Array.forEach (native)
at /usr/lib/node_modules/postgraphql/node_modules/graphql/type/schema.js:225:37
at typeMapReducer (/usr/lib/node_modules/postgraphql/node_modules/graphql/type/schema.js:236:7)
at /usr/lib/node_modules/postgraphql/node_modules/graphql/type/schema.js:234:22
at Array.forEach (native)
at /usr/lib/node_modules/postgraphql/node_modules/graphql/type/schema.js:225:37
at typeMapReducer (/usr/lib/node_modules/postgraphql/node_modules/graphql/type/schema.js:236:7)
at Array.reduce (native)
at new GraphQLSchema (/usr/lib/node_modules/postgraphql/node_modules/graphql/type/schema.js:104:34)
at schema (/usr/lib/node_modules/postgraphql/dist/graphql/createSchema.js:25:39)
at /usr/lib/node_modules/postgraphql/dist/createGraphqlSchema.js:32:57
at next (native)
at step (/usr/lib/node_modules/postgraphql/dist/createGraphqlSchema.js:17:191)
I have following schema:
When I am trying to start postgraphql it gives me error:
Schema validator works using reference comparison(===), so that can be fixed by using cache by name for enum types in https://github.com/calebmer/postgraphql/blob/master/src/graphql/getColumnType.js#L113.
The text was updated successfully, but these errors were encountered: