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
constschema=makeExecutableSchema({
typeDefs,
resolvers,})exportdefaultfunction(host,port,database){constgraphQLServer=express();graphQLServer.use(cors({origin: '*'}))graphQLServer.use(bodyParser.urlencoded({extended: true}),bodyParser.json())graphQLServer.use(authMiddleware)graphQLServer.use('/graphql',uploadMiddleware)graphQLServer.use('/graphiql',graphiqlExpress({endpointURL: '/graphql',subscriptionsEndpoint: `ws://${config.ws.HOST}:${config.ws.PORT}/${config.ws.PATH}`,}));graphQLServer.use('/graphql',apolloUploadExpress(),graphqlExpress(req=>{console.log(req.body)return{
schema,context: {db: database,user: req.user,JWT_SECRET: config.secrets.JWT}}}))returngraphQLServer.listen(port,()=>{console.log(`GraphQL Server is now running on http://${host}:${port}`)newSubscriptionServer({
schema,
execute,
subscribe,},{server: graphQLServer,path: '/subscriptions',})})}
my scalar is this
scalarFileUploadObject
and resolver is this
//import the GraphQLUpload functionimport{GraphQLUpload}from'apollo-upload-server'//added to other functions in the resolvers object
FileUploadObject: GraphQLUpload
This is similar to #45
What are you doing
I am trying to use
apollo-upload-client
to enable me upload files from my mobile appand my mutation is this
in my server, I have this for my graphql server
my scalar is this
and resolver is this
and my graqhql definition
What do you expect
When I tap the button, my input should be posted to the server
What are you experiencing
It keeps throwing this error
The text was updated successfully, but these errors were encountered: