Skip to content
This repository has been archived by the owner on Dec 8, 2021. It is now read-only.

Generated Resolvers interface not compatible with IResolvers from graphql-tools #124

Closed
schickling opened this issue Oct 18, 2018 · 5 comments

Comments

@schickling
Copy link
Contributor

schickling commented Oct 18, 2018

image

Current workaround (add as any):

const server = new GraphQLServer({
  typeDefs: './src/schema.graphql',
  resolvers: resolvers as any,
  context: { data },
})

My current understanding is that this is a limitation in graphql-tools. We should open an issue there.

@fedealconada
Copy link

any workaround until it is fixed?

@schickling
Copy link
Contributor Author

See comment from above:

Current workaround (add as any):

const server = new GraphQLServer({
  typeDefs: './src/schema.graphql',
  resolvers: resolvers as any,
  context: { data },
})

@alexedev
Copy link

Same problem here

@rlux
Copy link

rlux commented Feb 6, 2019

I am using makeExecutableSchema.
For me the incompatibility with IResolvers was caused by a missing index signature. All generated resolvers should have it. As a workaround, I declare my resolvers as "...Resolvers.Type & { [key: string]: any } ".

@jasonkuhrt
Copy link
Member

jasonkuhrt commented Feb 8, 2019

Duplicate of #15

And as stated here I don’t believe it’s a bug with graphqlgen
#15 (comment)

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

No branches or pull requests

5 participants