This repository has been archived by the owner on Sep 30, 2024. It is now read-only.
forked from graphql-editor/graphql-zeus
-
Notifications
You must be signed in to change notification settings - Fork 0
Rebase fork changes on top of upstream #6
Draft
ValentinH
wants to merge
91
commits into
master
Choose a base branch
from
v5-update
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Updated README.md with info about new Discussions forum
Fix invalid query arguments generation
…aliases Fix multiple aliases when generating query
✨ Added graphql-ws
Changed empty ZEUS_VARIABLES to empty object instead of never.
fix: variable generation with no enums
fix(graphql-editor#314): added explicit runtime error
…nt-decoding Fix Scalar Path generation for queries with inline fragments
Don't decode null values
scalars are now decoded in all ops
In order to be able to generate two versions of the codegen: - one for the backend generated from the "admin" permissions - one for the frontend generated from the "org_owner" permissions we need to replace enums by literals unions so that we can share some code between the 2 SDKs. Indeed, when using enums, Typescript complains about not having any overlap between enums even if they have the same values: <img width="988" alt="image" src="https://user-images.githubusercontent.com/2678610/161303594-c9030409-a855-487e-94a8-dd6448a7a2c9.png"> ([code](https://www.typescriptlang.org/play?#code/KYDwDg9gTgLgBMAdgVwLYJag+gZwJapgA2wcA3gLABQccAxgIY7ACMcAvHAOSPMtcAaarV7AATB26ixg6gF9qoSLAxpV2fIRJYJlGvSatJPQ-yH7px6bKoKq1OhEQ4IJAHREIAcwAUSNLgExMBuomzsEeqBWsA6AJRAA)) While string literals unions can simply be compared: <img width="290" alt="image" src="https://user-images.githubusercontent.com/2678610/161303751-b0d9bc5f-7b7b-46db-b926-553a9faba1ad.png"> Another benefit of using string literals unions is that they are non generated to the build output.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In this PR, we rebase the fork on top of the latest upstream master branch.
Some changes that were made before are not needed anymore because similar features were added on upstream:
We still have to maintain 2 differences for now:
I've tested this new version on our codebase and I see multiple reasons to not update at the moment:
useTypedQuery()
anduseTypedMutation()
anymore but would have to first create the query/mutation with the typedGql function and then directly call the originaluseQuery()
oruseMutation()
hooksIn this state, I'm pausing the upgrade effort for now.