Skip to content
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

Exclude the __typename field from GadgetRecord.toJSON() #176

Merged
merged 1 commit into from
Jun 30, 2023

Conversation

airhorns
Copy link
Contributor

@airhorns airhorns commented Apr 20, 2023

Riley noticed a discord user trying to pass record.toJSON() back as an input to a different action call. This didn't work out of the box because the .toJSON() includes all the fields that came back from loading the record, including __typename. When sending this back at the GraphQL API, the __typename attribute causes GraphQL to get mad as you are passing fields which don't exist as input fields.

@airhorns airhorns changed the title harry/ggt 3893 gadgetrecordtojson should exclude the Exclude the __typename field from GadgetRecord.toJSON() Apr 20, 2023
@airhorns airhorns force-pushed the harry/ggt-3893-gadgetrecordtojson-should-exclude-the branch from 3c32b71 to 06f1ee3 Compare April 20, 2023 20:11
@airhorns airhorns force-pushed the harry/ggt-3893-gadgetrecordtojson-should-exclude-the branch from 06f1ee3 to 727b1fe Compare June 28, 2023 02:43
@airhorns airhorns marked this pull request as ready for review June 28, 2023 02:44
@airhorns airhorns force-pushed the harry/ggt-3893-gadgetrecordtojson-should-exclude-the branch from 727b1fe to 6f4f422 Compare June 28, 2023 02:49
Copy link
Contributor

@jcao49 jcao49 left a comment

Choose a reason for hiding this comment

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

🚀💯

@airhorns airhorns merged commit cf3358c into main Jun 30, 2023
3 checks passed
@airhorns airhorns deleted the harry/ggt-3893-gadgetrecordtojson-should-exclude-the branch June 30, 2023 15:48
airhorns added a commit that referenced this pull request Jul 5, 2023
…recordtojson-should-exclude-the"

This reverts commit cf3358c, reversing
changes made to d59d082.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants