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 currently upgrading from Mesh v0 to v1, and since v1 works quite differently, I’d like to ask for your support.
My application is an express app with several REST endpoints. For the /graphql endpoint, I’m using the Mesh middleware:
app.use("/graphql",createBuiltMeshHTTPHandler());
This setup works perfectly — queries appear in GraphiQL, and when I execute one, the corresponding resolver is triggered as expected.
The other REST endpoints use Mesh’s generated SDKs for queries. This allows me to reuse the same logic for both REST and GraphQL, keeping the implementation consistent.
Unfortunately, this approach doesn’t trigger my resolvers, meaning I can’t use my custom schemas.
I have two questions:
In the new Mesh version, how can I register my resolvers so that when a query is called in GraphiQL (or in any other ways), it correctly invokes the associated resolver function?
How can I generate SDKs for my queries?
In the Codegen configuration, I know I need to add the documents property to generate the functions — but does that mean I now need to implement the queries in addition to the typedefs?
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 Members,
I’m currently upgrading from Mesh
v0tov1, and sincev1works quite differently, I’d like to ask for your support.My application is an
expressapp with several REST endpoints. For the/graphqlendpoint, I’m using the Mesh middleware:This setup works perfectly — queries appear in GraphiQL, and when I execute one, the corresponding resolver is triggered as expected.
The other REST endpoints use Mesh’s generated SDKs for queries. This allows me to reuse the same logic for both REST and GraphQL, keeping the implementation consistent.
Here’s my new setup for Mesh
v1:Unfortunately, this approach doesn’t trigger my resolvers, meaning I can’t use my custom schemas.
I have two questions:
In the new Mesh version, how can I register my resolvers so that when a query is called in GraphiQL (or in any other ways), it correctly invokes the associated resolver function?
How can I generate SDKs for my queries?
In the Codegen configuration, I know I need to add the
documentsproperty to generate the functions — but does that mean I now need to implement the queries in addition to the typedefs?Thank you in advance!
Beta Was this translation helpful? Give feedback.
All reactions