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

feat: improve top-level Query and Mutation type handling #72

Merged
merged 17 commits into from
May 28, 2024

Conversation

danadajian
Copy link
Collaborator

@danadajian danadajian commented May 24, 2024

📝 Description

  • Includes a generated class per field for the top-level Query and Mutation types.
  • Includes the Query and Mutation types in resolverInterfaces by default.

🔗 Related Issues

@danadajian danadajian requested a review from a team as a code owner May 24, 2024 19:12
@danadajian danadajian changed the title feat: improve top-level Query type handling feat: improve top-level Query and Mutation type handling May 25, 2024
@danadajian danadajian force-pushed the improve-query-type-handling branch from 47ec027 to c9311c8 Compare May 27, 2024 04:00
# Conflicts:
#	src/annotations/build-description-annotation.ts
#	src/config/build-config-with-defaults.ts
#	src/config/find-type-in-resolver-interfaces-config.ts
#	src/definitions/object.ts
@danadajian danadajian force-pushed the improve-query-type-handling branch from c0be1c1 to 6bce5a6 Compare May 28, 2024 15:39
@danadajian danadajian force-pushed the improve-query-type-handling branch from 6bce5a6 to 76cd369 Compare May 28, 2024 15:46
Copy link

@MicahWitthaus MicahWitthaus left a comment

Choose a reason for hiding this comment

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

I see there is an expected.kt for the new query field classes but I didn't see any tests using it in this PR. Are the tests generated somewhere in this repo?

@danadajian
Copy link
Collaborator Author

I see there is an expected.kt for the new query field classes but I didn't see any tests using it in this PR. Are the tests generated somewhere in this repo?

So each directory in the unit/ folder contains an expected.kt and schema.graphql file. The schema.graphql file should generate the expected.kt

@MicahWitthaus
Copy link

So each directory in the unit/ folder contains an expected.kt and schema.graphql file. The schema.graphql file should generate the expected.kt

@danadajian Gotcha, so there are no assertions checking that the schema.graphql file actually generates the expected.kt contents?

@danadajian
Copy link
Collaborator Author

So each directory in the unit/ folder contains an expected.kt and schema.graphql file. The schema.graphql file should generate the expected.kt

@danadajian Gotcha, so there are no assertions checking that the schema.graphql file actually generates the expected.kt contents?

There are, they are just done in a slightly abstract way in plugin.test.ts

@danadajian danadajian merged commit 884884b into main May 28, 2024
1 check passed
@danadajian danadajian deleted the improve-query-type-handling branch May 28, 2024 16:19
Copy link

🎉 This PR is included in version 3.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

danadajian added a commit that referenced this pull request Jun 14, 2024
* unit test

* refactor

* pass test

* add mutation tests

* fix integration test

* refactor

* reorganize

* separate field definition functions

* pull out boolean arg

* pull out other boolean arg

* refactor

* refactor

* bun version

* set up docs workspace

* docs
Copy link

🎉 This PR is included in version 3.3.0-alpha.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants