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

Support aliases #5

Merged
merged 2 commits into from
Nov 15, 2024
Merged

Support aliases #5

merged 2 commits into from
Nov 15, 2024

Conversation

canac
Copy link
Collaborator

@canac canac commented Nov 15, 2024

Previously for a query containing aliases like

query {
  int1: returnInt
  int2: returnInt
  int3: returnInt
}

graphql-ergonomock would ignore the aliases. You would have to provide a mock like { returnInt: 1 } and the mocked response would be { int1: 1, int2: 1, int3: 1}.

Now for that query, a mock { int1: 1, int2: 2, int3: 3 } yields a response of { int1: 1, int2: 2, int3: 3 } as expected.

Fixes SurveyMonkey#167

@canac canac requested a review from dr-bizz November 15, 2024 03:43
@canac canac self-assigned this Nov 15, 2024
@canac canac merged commit 6477ca6 into master Nov 15, 2024
2 checks passed
@canac canac deleted the support-aliases branch November 15, 2024 16:29
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.

Doesn't work with aliases.
2 participants