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 was trying to create a simple example for joing data from multiple API paradigms (GraphQL and REST for this case) using mesh, and since Github REST and GraphQL APIs uses same types of Identification, I thought it would be a good example. But I'm having issues.
This is the mesh.config.ts file I used:
import{defineConfig,loadGraphQLHTTPSubgraph,}from"@graphql-mesh/compose-cli";import{loadOpenAPISubgraph}from"@omnigraph/openapi";exportconstcomposeConfig=defineConfig({subgraphs: [{sourceHandler: loadOpenAPISubgraph("GithubRest",{source:
"https://raw.githubusercontent.com/github/rest-api-description/refs/heads/main/descriptions-next/api.github.com/api.github.com.json",}),// current github OpenAPI},{sourceHandler: loadGraphQLHTTPSubgraph("GithubGraphQL",{endpoint: "https://api.github.com/graphql",source: "https://docs.github.com/public/fpt/schema.docs.graphql",}),// current github GraphQL Schema},],});
But every time I try to run it it gives me a lot of errors like this:
ERROR Mesh Compose The following supergraph API query:
{
packages_list_docker_migration_conflicting_packages_for_organization(org: "A string value") {
... on Package {
repository {
usesCustomOpenGraphImage
}
}
}
}
cannot be satisfied by the subgraphs because:
- from subgraph "GithubRest":
- cannot find field "Repository.usesCustomOpenGraphImage".
- cannot move to subgraph "GithubGraphQL", which has field "Repository.usesCustomOpenGraphImage", because type "Repository" has no @key defined in subgraph "GithubGraphQL".
I have tried to rename and give each API a prefix because I imagine that a naming conflict would result on this and that didn't work. I also tried to use the semantic conventions and that didn't work either. I also tested running them separated and that worked fine.
I just want to understand what a solution to solve those conflicts would look like.
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.
-
Hi,
I was trying to create a simple example for joing data from multiple API paradigms (GraphQL and REST for this case) using mesh, and since Github REST and GraphQL APIs uses same types of Identification, I thought it would be a good example. But I'm having issues.
This is the mesh.config.ts file I used:
But every time I try to run it it gives me a lot of errors like this:
I have tried to rename and give each API a prefix because I imagine that a naming conflict would result on this and that didn't work. I also tried to use the semantic conventions and that didn't work either. I also tested running them separated and that worked fine.
I just want to understand what a solution to solve those conflicts would look like.
Beta Was this translation helpful? Give feedback.
All reactions