Hey <@U6JL6UPT6> thanks for pointing this out! I’v...
# orm-help
m
Hey @rein thanks for pointing this out! I’ve just updated the docs. Yes, it’s exactly as you’ve said. We have changed
fieldMiddleware
to
middlewares
. Yoga’s docs was in sync but we must have forgotten to update this one as well. Thanks again!
👍 1
r
My pleasure! Though, while you are at it, it seems when you pass the
beepMiddleware
example in the
middlewares
array, the server crashes as well. Has the desired structure changed as well?
if this is at all helpful:
Copy code
TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at Object.addResolveFunctionsToSchema (/Users/rein/code/servers/switch-daily-server/node_modules/graphql-tools/src/schemaGenerator.ts:391:10)
    at addMiddlewareToSchema (/Users/rein/code/servers/switch-daily-server/node_modules/graphql-yoga/node_modules/graphql-middleware/src/index.ts:158:3)
    at /Users/rein/code/servers/switch-daily-server/node_modules/graphql-yoga/node_modules/graphql-middleware/src/index.ts:171:7
    at Array.reduce (<anonymous>)
    at applyMiddleware (/Users/rein/code/servers/switch-daily-server/node_modules/graphql-yoga/node_modules/graphql-middleware/src/index.ts:169:43)
    at new GraphQLServer (/Users/rein/code/servers/switch-daily-server/node_modules/graphql-yoga/src/index.ts:119:51)
    at Object.<anonymous> (/Users/rein/code/servers/switch-daily-server/src/index.ts:14:16)
    at Module._compile (module.js:652:30)
    at Module.m._compile (/Users/rein/code/servers/switch-daily-server/node_modules/ts-node/src/index.ts:403:23)
m
Hey @rein, I am unable to reproduce this error. Could you provide a more detailed description of the issue?
r
@matic I pmed you with more details
m
@rein fixed!
🙌 1