Closed roeeklinger closed 4 months ago
@roeeklinger can you try with:
@graphql-mesh/cli@0.91.0-alpha-20240620123302-b0b8c297177208f5e5378cf7da64c3220c4a9c0c
from #7131. Thanks!
If it still doesn't work, a repro would be much appreciated!
Thanks @enisdenjo ! I tested the package hash you suggested, but unfortunately it had the same result.
My project had a lot of private stuff, so I gathered some public APIs from the web and stitched together a repro repo for you here.
Simply run:
npm run dev
and try:
curl -X POST http://localhost:5174/api
You will see the error come up.
You can also use the following commands to pull schema:
npm run build:mesh
Hope that helps!
Hey @roeeklinger, I've dug around v0 and couldn't get it to work... Our docs seem to be outdated.
However, I've tried the same with the new upcoming Mesh v1 here: https://github.com/roeeklinger/graph-mesh-sveltekit/pull/1 and it seems to work! Can you please try it and report?
Also updated the documentation for v1 showcasing what I did: https://github.com/ardatan/graphql-mesh/pull/7263.
Hey @enisdenjo ! Thanks for the update, much appreciated.
Initially I thought this fixed the issue, After reviewing the code and mesh up close, I realized the code you suggested didn't really work, we were mislead by Houdini. When you configured Houdini with watchSchema
, it watched the tcgdex schema and updated the root schema.graphql
, overriding what mesh-compose generated, this gave us the illusion that mesh worked while in reality, if you tested the API directly it did not. Houdini was sending the requests to tcgdex directly.
However, your old "not native" implementations did work, I managed to play around with them a bit and get them working "natively" in the latest main commit in roeeklinger/graph-mesh-sveltekit.
I am not sure if everything there is needed, but at least it works.
It seems like #7263 will need to be updated, as the current docs again reflect code that doesn't actually work on Sveltekit.
@roeeklinger mind the closed issue. I'll continue to investigate as per https://github.com/ardatan/graphql-mesh/issues/7130#issuecomment-2221733936 and get back to you here. We'll open other issues if necessary! Thank you for your patiance.
Hey hey, sorry for the delay - we're quite busy ahead of the upcoming GraphQL Conf 2024. I've noticed you managed to get the integration working with Mesh and have the knowhow of it. A PR updating the SvelteKit documentation would be very welcome and much appreciated!
if this guide is followed, mesh can run well with Sveltekit: https://the-guild.dev/graphql/mesh/docs/getting-started/deploy-mesh-gateway#mesh-and-sveltekit
package.json
src/routes/api/+server.ts
after that I can run these commands:
this works well.
however, if I try to run it as serverless, since I am deploying on Vercel:
I get this error:
Mesh can be deployed to Vercel using NextJS, and it can be deployed using Sveltekit, can I also deploy Mesh to Vercel as serverless when using Sveltekit?