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

Does graphql-yoga work on M1 (Node 15)? #671

Closed
trackwell-mike opened this issue May 5, 2021 · 1 comment
Closed

Does graphql-yoga work on M1 (Node 15)? #671

trackwell-mike opened this issue May 5, 2021 · 1 comment

Comments

@trackwell-mike
Copy link

trackwell-mike commented May 5, 2021

I'm working on a new M1 and I'm getting the error below when I attempt to install my project.

I'm using Node 15.14.0, which is compatible with M1 architecture. Our project is currently set up for Node 11.14.0, which is not compatible with M1, so I'm working my way through version updates, etc. My guess is that the error below is related to my Node version, but I wanted to reach out and see if anyone else has noticed this issue.

Other related issues that don't address my problem:

Additional context

graphql: 14.5.8
graphql-shield: 5.7.3
graphql-upload: ^10.0.0
graphql-yoga: 1.18.3
node: 15.14.0

Error Message

Error: Type generator exists in middleware but is missing in Schema.
    at /repo/node_modules/graphql-yoga/node_modules/graphql-middleware/src/validation.ts:17:13
    at Array.forEach (<anonymous>)
    at Object.validateMiddleware (/repo/node_modules/graphql-yoga/node_modules/graphql-middleware/src/validation.ts:15:27)
    at addMiddlewareToSchema (/repo/node_modules/graphql-yoga/node_modules/graphql-middleware/src/middleware.ts:33:27)
    at normalisedMiddlewares.reduceRight.schema.schema (/repo/node_modules/graphql-yoga/node_modules/graphql-middleware/src/middleware.ts:89:11)
    at Array.reduceRight (<anonymous>)
    at applyMiddlewareWithOptions (/repo/node_modules/graphql-yoga/node_modules/graphql-middleware/src/middleware.ts:78:77)
    at applyMiddleware (/repo/node_modules/graphql-yoga/node_modules/graphql-middleware/src/middleware.ts:129:10)
    at new GraphQLServer (/repo/node_modules/graphql-yoga/src/index.ts:137:13)
    at Object.<anonymous> (/repo/src/index_public.ts:9:23)
[DEBUG] 17:00:48 Child error
[ERROR] 17:00:48 Error: Type generator exists in middleware but is missing in Schema.
[DEBUG] 17:00:48 Disconnecting from child
[DEBUG] 17:00:48 Sending SIGTERM kill to child pid 46503
Child got SIGTERM, exiting.
[DEBUG] 17:00:48 Child exited with code 0

Btw, this is where we call GraphQLServer in index.public.ts:

import { GraphQLServer } from 'graphql-yoga'
import { permissions } from './permissions'
import { createContext } from './types'
import { schema } from './schema'

const graphQLServer = new GraphQLServer({
  schema: schema,
  middlewares: [permissions],
  context: createContext,
})
@trackwell-mike trackwell-mike changed the title Does graphql-yoga work on M1? Does graphql-yoga work on M1 (Node 15)? May 5, 2021
@saihaj
Copy link
Collaborator

saihaj commented Feb 19, 2022

Hey @trackwell-mike we @the-guild-org are the new maintainers for this project and actively developing v2. The new yoga server we recommend using latest version of Node. Checkout out new docs https://www.graphql-yoga.com/ and would love to get your feedback on beta release!

@saihaj saihaj closed this as completed Feb 19, 2022
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

2 participants