Replies: 3 comments 3 replies
-
|
Beta Was this translation helpful? Give feedback.
-
Thank you for your reply. Yes good idea to make a minimal application with the code, I shall try to fit it in! My only question on this is what to use instead of delegateToSchema? All the tutorials online, which are not many, demonstrate using delegateToSchema to stitch two schemas together based on a mutual field (e.g. ID). I can't find any info how to do it without delegateToSchema. Thanks |
Beta Was this translation helpful? Give feedback.
-
I have started to use Stepzen and got all this working with them now, they were really helpful in overcoming some issues too, so all working with Stepzen instead of GraphQL. |
Beta Was this translation helpful? Give feedback.
-
I just can't figure this out and hoping someone could help...
I have stitched two schemas together and run it's graphql server on localhost to query it. But the query returns null for the data in the second schema and I am not sure why.
I have the following code to stitch to remote schemas together and run a localhost graphql server to serve it. It should add the linked data from the second schema under cmsMetaData in the main Product data. But cmsMetaData is always null.
I think delegateToSchema() returning null but can't figure out why. I have even passed args as id:1 just to be absolutely sure the args will result in data that exists, but it does not get anything.
utils/createRemoteExecutor.js is:
The query is:
The args I use do work on the stitched GraphQL when fetching the second original GraphQL data, for strapi_products, its just the data is not added to the first GraohQL for products, its null.
In my api.tsx, which I generate using codegen.yaml, Product contains cmsMetaData as follows, which is of type Strapi_Product:
Strapi_Product is as follows which contains Title, SaleorID etc.:
But the date in GraphQL shows null for cmsMetaData as null:
Beta Was this translation helpful? Give feedback.
All reactions