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
Make sure to fork this template and run yarn generate in the terminal.
Please make sure Mesh package versions under package.json matches yours.
2. A failing test has been provided
3. A local solution has been provided
4. A pull request is pending review
Running the repo shows it failing right away.
Describe the bug
I want to rename the field txName in the Treatment type to name and make it non nullable. Effectively going from:
type Treatment {
txName: String
}
to:
type Treatment {
name: String!
}
I used the rename and replace fields together at the source level and the transform seems to work as expected because the resulting schema looks the way I want it.
However, when I run the CLI with mesh dev it fails with the following error:
🕸️ Mesh - Server 💡 Starting GraphQL Mesh...
🕸️ Mesh - Server 💡 Serving GraphQL Mesh: http://0.0.0.0:4000
Transformed schema is not set yet. Returning a dummy one.
🕸️ Mesh 💡 Generating index file in TypeScript
🕸️ Mesh 💥 An error occurred while building the artifacts: TypeError: Cannot read properties of undefined (reading 'get')
at generateTsArtifacts (/Users/dario/mesh-test/node_modules/@graphql-mesh/cli/cjs/commands/ts-artifacts.js:113:70)
at /Users/dario/mesh-test/node_modules/@graphql-mesh/cli/cjs/index.js:131:63
If I use the transforms separately the error is gone. The order of the transforms doesn't matter.
What I noticed is that unifiedSchema.extensions is an empty object in @graphql-mesh/cli/cjs/commands/ts-artifacts.js. Not sure why it could end up like that?
To Reproduce Steps to reproduce the behavior:
Running the repo shows it failing.
Expected behavior
It should apply the transform as expected.
Environment:
OS: macOS 14.4.1 (23E224) (local)/on codesanbox it's whatever it uses
When I forked the sample project on Codesandbox, I saw it had a jsonschema source on it. I went ahead and added my code after the jsonschema source and to my surprise it worked! So if you uncomment the json schema it won't complain. I'm using that as a workaround for now.
Thanks!
The text was updated successfully, but these errors were encountered:
Issue workflow progress
Progress of the issue based on the
Contributor Workflow
https://codesandbox.io/p/devbox/polished-water-d96hms?file=%2Fpackage.json%3A7%2C25
Running the repo shows it failing right away.
Describe the bug
I want to rename the field txName in the Treatment type to name and make it non nullable. Effectively going from:
to:
I used the rename and replace fields together at the source level and the transform seems to work as expected because the resulting schema looks the way I want it.
However, when I run the CLI with mesh dev it fails with the following error:
If I use the transforms separately the error is gone. The order of the transforms doesn't matter.
What I noticed is that
unifiedSchema.extensions
is an empty object in@graphql-mesh/cli/cjs/commands/ts-artifacts.js
. Not sure why it could end up like that?To Reproduce Steps to reproduce the behavior:
Running the repo shows it failing.
Expected behavior
It should apply the transform as expected.
Environment:
Additional context
When I forked the sample project on Codesandbox, I saw it had a jsonschema source on it. I went ahead and added my code after the jsonschema source and to my surprise it worked! So if you uncomment the json schema it won't complain. I'm using that as a workaround for now.
Thanks!
The text was updated successfully, but these errors were encountered: