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
{{ message }}
This repository has been archived by the owner on Sep 3, 2021. It is now read-only.
interface Person {
id: ID!
name: String
}
type A implements Person {
id: ID!
name: String
}
type B implements Person {
id: ID!
name: String
}
When I run a query of the type:
query {
Person {
name
}
}
I get the following error from the server.
Abstract type \"Person\" must resolve to an Object type at runtime for field \"Query.Person\" with value { name: \"A Person\", FRAGMENT_TYPE: null }, received \"null\". Either the \"Person\" type should provide a \"resolveType\" function or each possible type should provide an \"isTypeOf\" function.
The full stacktrace is:
GraphQLError: Abstract type "Person" must resolve to an Object type at runtime for field "Query.Person" with value { name: "Giles Dring", FRAGMENT_TYPE: null }, received "null". Either the "Person" type should provide a "resolveType" function or each possible type should provide an "isTypeOf" function.
at ensureValidRuntimeType (/Users/gilesdring/src/dringtech/eccoo/graph/api/node_modules/graphql/execution/execute.js:687:11)
at completeAbstractValue (/Users/gilesdring/src/dringtech/eccoo/graph/api/node_modules/graphql/execution/execute.js:680:42)
at completeValue (/Users/gilesdring/src/dringtech/eccoo/graph/api/node_modules/graphql/execution/execute.js:604:12)
at completeValueCatchingError (/Users/gilesdring/src/dringtech/eccoo/graph/api/node_modules/graphql/execution/execute.js:514:19)
at /Users/gilesdring/src/dringtech/eccoo/graph/api/node_modules/graphql/execution/execute.js:636:25
at from (<anonymous>)
at completeListValue (/Users/gilesdring/src/dringtech/eccoo/graph/api/node_modules/graphql/execution/execute.js:632:49)
at completeValue (/Users/gilesdring/src/dringtech/eccoo/graph/api/node_modules/graphql/execution/execute.js:592:12)
at /Users/gilesdring/src/dringtech/eccoo/graph/api/node_modules/graphql/execution/execute.js:511:16
at processTicksAndRejections (internal/process/task_queues.js:97:5)
This seems similar to a few other issues, but not exactly. I'm using v2.13.0. The way I'm reading the documentation, it should work.
The text was updated successfully, but these errors were encountered:
I have the following schema
When I run a query of the type:
I get the following error from the server.
The full stacktrace is:
This seems similar to a few other issues, but not exactly. I'm using v2.13.0. The way I'm reading the documentation, it should work.
The text was updated successfully, but these errors were encountered: