-
Notifications
You must be signed in to change notification settings - Fork 348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes #2911: Nested query parameters shouldn't cause errors. #3635
Fixes #2911: Nested query parameters shouldn't cause errors. #3635
Conversation
🦋 Changeset detectedLatest commit: c322e84 The changes in this PR will be included in the next version bump. This PR includes changesets to release 8 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/theguild/graphql-mesh/7XgP2wcF8LDdZdqizhNiRJ4j3zFj |
urlObject.searchParams.set(paramName, val); | ||
} | ||
} | ||
urlObject.search = qs.stringify(query); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This overwrites existing values
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe?
urlObject.search = qs.stringify(query); | |
Object.assign(urlObject.search, qs.stringify(query)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
search is not an object, it is a string.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oof, right!
@ardatan is attempting to deploy a commit to the The Guild Team on Vercel. A member of the Team first needs to authorize it. |
Description
This closes #2911: When translating from OpenAPI calls to GraphQL, nested query objects aren't correctly set - it will only accept primitive objects, which is especially problematic when you don't control the underlying OpenAPI specification. (e.g. using a third party service).
Type of change
Please delete options that are not relevant.
Screenshots/Sandbox (if appropriate/relevant):
N/A
How Has This Been Tested?
nested_objects.test.ts
) has been added that breaks without the associated changes in the OpenAPIresolver_builder.ts
Test Environment:
@graphql-mesh/...
:Checklist:
Further comments
N/A