-
Notifications
You must be signed in to change notification settings - Fork 351
Open
Description
Issue workflow progress
Progress of the issue based on the
Contributor Workflow
Describe the bug
graphql-mesh/compose cannot consume graph generated by itself
To Reproduce Steps to reproduce the behavior:
run:
$ npm i @graphql-mesh/compose-cli
$ npm i @graphql-hive/gateway
create 2 files:
mesh.orig.ts
import {
defineConfig,
loadGraphQLHTTPSubgraph
} from '@graphql-mesh/compose-cli'
export const composeConfig = defineConfig({
subgraphs: [
/**/{
sourceHandler: loadGraphQLHTTPSubgraph('MortyB', {
endpoint: 'https://rickandmortyapi.com/graphql'
}),
},
]
})
mesh.hive.ts
import {
defineConfig,
loadGraphQLHTTPSubgraph
} from '@graphql-mesh/compose-cli'
export const composeConfig = defineConfig({
subgraphs: [
/**/{
sourceHandler: loadGraphQLHTTPSubgraph('MortyB', {
endpoint: 'http://localhost:5001/graphql'
}),
},
]
})
run following
$ npx mesh-compose -c mesh.orig.ts -o supergraph_orig.graphql
$ npx hive-gateway -p 5001 supergraph_orig
in other terminal run
$ npx mesh-compose -c mesh.hive.ts -o supergraph_hive.graphql
error message:
ERROR [Mesh Compose, subgraph=MortyB] Schema must contain uniquely named types but contains multiple types named "TransportOptions".
ERROR [Mesh Compose, subgraph=MortyB] Failed to load subgraph
Expected behavior
The graph can be composed and used
Metadata
Metadata
Assignees
Labels
No labels