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
I’m upgrading my Node.js Express server that uses GraphQL Mesh from v0.x to v1.x. Since v1 requires the use of graphql-code-generator, I need to integrate it into my setup. My project uses Mesh as middleware and relies on an SDK. The previous version worked fine, but I’m currently running into issues with the v1 upgrade.
In schemas folder I have some .ts files that return GraphQL schemas:
const{ typeDefs, transformer }=createAuthorizationDirective({directiveName: "authorize",authorizationFunctions: authorizationPolicies,});varschema=makeExecutableSchema({typeDefs: /* GraphQL */`${graphQLTypeAPI}${graphQLTypeTeam} ... type Query { """ Retrieve a specific team by stage and ID. List of results can be different based on user context. """ api_management_team(stage: String!, id: String): Team @authorize(type: "authorizeViewTeam") ... `,resolvers: {Query: {api_management_team: async(_parent: any,args: {stage: string;id: string;},
context,info)=>{constresponse=awaitgetTeam(_parent,context,args);return response;},}}schema=transformer(schema);exportdefaultschema;
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Dear Community,
I’m upgrading my Node.js Express server that uses GraphQL Mesh from v0.x to v1.x. Since v1 requires the use of
graphql-code-generator
, I need to integrate it into my setup. My project uses Mesh as middleware and relies on an SDK. The previous version worked fine, but I’m currently running into issues with the v1 upgrade.In
schemas
folder I have some.ts
files that return GraphQL schemas:mesh.config.ts
:codegen.ts
:When I generate the SDK the
getSdk
looks like this:Do you have any idea what is the problem here?
Thank you in advance!
Beta Was this translation helpful? Give feedback.
All reactions