-
Notifications
You must be signed in to change notification settings - Fork 353
Description
Issue workflow progress
Progress of the issue based on the
Contributor Workflow
- 1. The issue provides a reproduction available on
Github,
Stackblitz
or
CodeSandbox
Make sure to fork this template and run
yarn generatein the terminal.Please make sure Mesh package versions under
package.jsonmatches yours.
- 2. A failing test has been provided
- 3. A local solution has been provided
- 4. A pull request is pending review
Describe the bug
As reported in #7869 the option ignoreSemanticConventions (and also alwaysAddTransportDirective) is ignored. There has been a fix with commit 56e7b60, but that is only effective if the mesh configuration contains the option 'subgraph'
export const composeConfig = defineConfig({ ignoreSemanticConventions: true, subgraph: 'something' })
To Reproduce Steps to reproduce the behavior:
Use this mesh.config.ts
import { defineConfig, loadGraphQLHTTPSubgraph } from '@graphql-mesh/compose-cli'
export const composeConfig = defineConfig({
ignoreSemanticConventions: true,
subgraphs: [
{
sourceHandler: loadGraphQLHTTPSubgraph('Books', {
endpoint: 'http://localhost:8080/graphql',
source: 'book.graphqls'
}),
},
]
})
and this book.graphqls subgraph
type Query {
book(id: ID!): Book
}
type Book {
id: ID!
}
When generating the supergraph with npx mesh-compose -o supergraph.graphql it should not contain any merge directives, but it does:
type Query @join__type(graph: BOOKS) {
book(id: ID!) : Book @merge(subgraph: "Books", keyField: "id", keyArg: "id")
}
Expected behavior
With ignoreSemanticConventions set to true no merge directives should be added automatically.
Environment:
- OS: win11
@graphql-mesh/compose-cli: 1.4.12- NodeJS: 24.0.2
Additional context
I am not a js developer but I think the provided patch could resolve the issue.
fix(compose-cli)__pass_down_ignoreSemanticConventions_and_alwaysAddTransportDirective.patch