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

test: remove duplicate enum def #861

Merged
merged 1 commit into from
Jul 31, 2024
Merged

test: remove duplicate enum def #861

merged 1 commit into from
Jul 31, 2024

Conversation

dpilch
Copy link
Member

@dpilch dpilch commented Jul 31, 2024

Description of changes

It is not possible to use a.ref in a custom query/mutation currently. Previously the enum would need to be defined twice (once as the top-level enum type and then in the custom query/mutation).

EchoQueryStatus: a.enum([
  'PROGRESS',
  'COMPLETED',
]),
// Custom query
echoQuery: a
  .query()
  .arguments({
    status: a.enum(['PROGRESS', 'COMPLETED']),
  })

A change to the data schema builder now auto-creates the top-level enum type. This resulted in duplicate enum definition for EchoQueryStatus in our tests.

enum EchoQueryStatus {
  PROGRESS
  COMPLETED
}

# defined twice
enum EchoQueryStatus {
  PROGRESS
  COMPLETED
}

Description of how you validated changes

E2E tests


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@dpilch dpilch marked this pull request as ready for review July 31, 2024 16:22
@dpilch dpilch requested a review from a team as a code owner July 31, 2024 16:22
@dpilch dpilch merged commit 15a1711 into main Jul 31, 2024
4 of 5 checks passed
@dpilch dpilch deleted the fix-gen2-tests branch July 31, 2024 17:04
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