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
The workaround for #6877 was to keep the dummy json schema source. However, if that's in place the query sent to my source is reformatted and the arguments are moved onto variables.
Eg, given this query:
{
treatments(where: {
id: { _isNull: true }
name: { _eq: "Test" }
}) {
id
name
}
}
If the dummy json schema is in place, the source graphql server gets:
Which is what I would expect graphql-mesh would send to my server.
To Reproduce Steps to reproduce the behavior:
If you toggle the Hello World source on/off you'll be able to test it alright. I added a dummy graphql endpoint server that returns the body it got sent in Treatment.name.
Expected behavior
The expected behaviour is that graphql-mesh send the query including renamed variables.
Environment:
OS: macOS 14.4.1 (23E224) (local)/on codesanbox it's whatever it uses
Issue workflow progress
Progress of the issue based on the
Contributor Workflow
Github,
Stackblitz
or
CodeSandbox
https://codesandbox.io/p/devbox/eloquent-dew-l57vz8
Describe the bug
This issue comes as a side-effect of the workaround used on the issue I reported in #6877.
I want to rename the field txName in the Treatment type to name and in the TreatmentBoolExp input type. Effectively going from:
to:
The workaround for #6877 was to keep the dummy json schema source. However, if that's in place the query sent to my source is reformatted and the arguments are moved onto variables.
Eg, given this query:
If the dummy json schema is in place, the source graphql server gets:
I instead, the dummy source isn't place, it gets this:
Which is what I would expect graphql-mesh would send to my server.
To Reproduce Steps to reproduce the behavior:
If you toggle the Hello World source on/off you'll be able to test it alright. I added a dummy graphql endpoint server that returns the body it got sent in Treatment.name.
Expected behavior
The expected behaviour is that graphql-mesh send the query including renamed variables.
Environment:
Additional context
It all comes back to the original issue caused by using rename and replace-field together on the source.
Thanks!
The text was updated successfully, but these errors were encountered: