Skip to content
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.

Handle data objects with variables in GraphQL Client #97

Merged
merged 2 commits into from
Feb 9, 2021

Conversation

thecodepixi
Copy link
Contributor

WHY are these changes introduced?

Previously, the GraphQL Client expected all data to be DataType.GraphQL/application/graphql, which did not account for queries that include variables. Queries with variables will be objects, so their type needs to be DataType.JSON/application/json.

WHAT is this pull request doing?

Checks the incoming data type, and updates the type on the client params accordingly, based on whether it is an object or not.

Type of change

  • Patch: Bug (non-breaking change which fixes an issue)
  • Minor: New feature (non-breaking change which adds functionality)
  • Major: Breaking change (fix or feature that would cause existing functionality to not work as expected)

@thecodepixi thecodepixi requested a review from a team as a code owner February 8, 2021 21:32
Copy link
Contributor

@paulomarg paulomarg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made a suggestion on the test, but otherwise LGTM.

Copy link
Contributor

@carmelal carmelal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@thecodepixi thecodepixi merged commit 6ad910c into main Feb 9, 2021
@thecodepixi thecodepixi deleted the default-data-type-for-graphql branch February 9, 2021 21:18
@thecodepixi thecodepixi temporarily deployed to production February 10, 2021 16:52 Inactive
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants