"Upload" defined in resolvers, but not in schema
See original GitHub issueAfter passing resolvers
into ApolloServer
, it adds Upload: Upload
to it. This causes the above error when reusing it in makeExecutableSchema
const server = new ApolloServer({
typeDefs,
resolvers,
dataSources: () => ({
dsBooks: new DSBooks()
}),
context: async ({ req }) => ({ user: await getUser(req.headers.authorization) })
})
import { makeExecutableSchema } from 'graphql-tools'
const schema = makeExecutableSchema({ typeDefs, resolvers })
Currently I work around it by delete resolvers.Upload
My app has no file upload function, so it is very strange to see anything about Upload.
Please fix this problem.
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
GraphQL : the object name is defined in resolvers, but not in ...
My mutation is getting an object as argument. So I defined the new Object in the schema and in the resolver using GraphQLObjectType....
Read more >How to resolve 'X defined in resolvers, but not in schema' with ...
The root cause here is that the babel-plugin-inline-import plugin caches your schema. The resolution is essentially to have BABEL_DISABLE_CACHE=1 in your . env ......
Read more >'Defined in resolvers, but not in schema' need help! - apollo
Hi everybody, I'm starting with Apollo and hit the following error when defining a new mutation: “Error: “sendResetPasswordEmail” defined in ...
Read more >Resolvers - Apollo GraphQL Docs
A resolver is a function that's responsible for populating the data for a single field in your schema. It can populate that data...
Read more >error mutation defined in resolvers, but not in schema
error mutation defined in resolvers, but not in schema ... The reason for the error you're seeing is that you've effectively told makeExecutableSchema...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I merely followed the Apollo Server README which shows passing
typedefs
andresolvers
rather than a schema.I only needed to call
makeExecutableSchema
because theServerOptions
argument inSubscriptionServer.create()
expectsschema
, nottypedefs
andresolvers
separately.I don’t think any of this should be relevant to whether
Upload
is added to resolvers by default.I’ve been trying to use Apollo Server’s built-in
SubscriptionServer
(with Meteor’s WebApp HTTP server). Is this the correct way?:The client successfully connects, but gets
Subscription error: {"message":"Cannot read property 'headers' of undefined"}
.