Issue workflow progress
Progress of the issue based on the
Contributor Workflow
Make sure to fork this template and run yarn generate in the terminal.
Please make sure Mesh package versions under package.json matches yours.
Describe the bug
To Reproduce Steps to reproduce the behavior:
- Include a property in a component schema that looks something like this:
{
"anyOf": [
{"type": "string"},
{"type": "null"}
]
}
- The following type gets generated:
type Property @join__type(graph: GRAPH) {
String: String @resolveRoot(subgraph: "Graph")
Void: Void @resolveRoot(subgraph: "Graph")
}
Reproduction Codesandbox
Expected behavior
I would expect it to generate a nullable scalar type.
Environment:
- OS: MacOS 15.6
- "@graphql-hive/gateway": "^1.16.3",
- "@graphql-mesh/compose-cli": "^1.4.12",
- "@graphql-mesh/types": "^0.104.7",
- "@graphql-mesh/utils": "^0.104.7",
- "@omnigraph/openapi": "^0.109.14",
- "graphql": "^16.11.0
- NodeJS: 24.4.0
Additional context
I'm happy to send in a fix for this if you could just point me in the right direction in the codebase.
Issue workflow progress
Progress of the issue based on the
Contributor Workflow
Github,
Stackblitz
or
CodeSandbox
Describe the bug
To Reproduce Steps to reproduce the behavior:
{ "anyOf": [ {"type": "string"}, {"type": "null"} ] }Reproduction Codesandbox
Expected behavior
I would expect it to generate a nullable scalar type.
Environment:
Additional context
I'm happy to send in a fix for this if you could just point me in the right direction in the codebase.