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

Expected Behavior when there are no possibleTypes #57

Open
MarkHerhold opened this issue May 3, 2021 · 0 comments
Open

Expected Behavior when there are no possibleTypes #57

MarkHerhold opened this issue May 3, 2021 · 0 comments

Comments

@MarkHerhold
Copy link

MarkHerhold commented May 3, 2021

How is this library supposed to behave when there are no in possibleTypes, e.g. on an interface that extends nothing?

File detail.graphql

schema {
  query: Query
}

type Query {
  getDetail: Detail
}

interface Detail {
  name: String!
  value: Float
}

File output.d.ts

// lots of lines omitted...

export interface DetailTypeResolver<TParent = any> {
  (parent: TParent, context: any, info: GraphQLResolveInfo):  | Promise<>; // <--- notice empty return type and no Promise return type
}

Debugger after evaluating const introspectResult = await getIntrospectResult(); here shows no possibleTypes (empty array):
image

My question is what is the intended output or if this is a bug, what is the expected output?

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

1 participant