graphql-code-generator-community
graphql-code-generator-community copied to clipboard
Graphql codegen typescript effect
🚨 IMPORTANT: Please do not create a Pull Request without creating an issue first.
Any change needs to be discussed before proceeding. Failure to do so may result in the rejection of the pull request.
Description
Implements a new GraphQL codegen plugin that outputs a client SDK written using Effect.
Related # (issue)
#664
Type of change
Please delete options that are not relevant.
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update
Screenshots/Sandbox (if appropriate/relevant):
Adding links to sandbox or providing screenshots can help us understand more about this PR and take action on it as appropriate
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
- [ ] Test A
- [ ] Test B
Test Environment:
- OS: MacOS 14.2.1 (23C71)
@graphql-codegen/...:- NodeJS: v20.11.0
Checklist:
- [x] I have followed the CONTRIBUTING doc and the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my feature works
- [x] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream modules
Further comments
I've mostly followed the implementation of @graphql-codegen/typescript-graphql-request
🦋 Changeset detected
Latest commit: f374095da8d12843b08648e074a197351e7fa66a
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 1 package
| Name | Type |
|---|---|
| @graphql-codegen/typescript-effect | Minor |
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
@saihaj how do I get the ball rolling on this PR? I opened #665 about 2 months ago and nobody has looked at it since. This PR is the re-opened version of it after my fork sync mistake that closed it.
@Urigo I've just removed the no longer necessary patch of @urql/[email protected]. The fix was added in v0.3.3. I think it should be ready for another attempt at running the CI. Lemme know if you want me to squash all the commits into a single one after all the tests pass 🙇
It's a mystery to me why I'm getting the following error during the build step:
Type 'import("/Users/avecerek/Code/graphql-code-generator-community/node_modules/@graphql-codegen/visitor-plugin-common/typings/utils").DeclarationBlock' is not assignable to type 'import("/Users/avecerek/Code/graphql-code-generator-community/packages/plugins/c-sharp/c-sharp/node_modules/@graphql-codegen/visitor-plugin-common/typings/utils").DeclarationBlock'.
This PR does not touch @graphql-codegen/visitor-plugin-common nor c-sharp packages.
The problem is introduced in https://github.com/dotansimha/graphql-code-generator-community/pull/701/commits/873debdf76aa905ebfd8412c10122b03ea573678. I have no clue why but yarn suddenly resolves the node_modules differently after a new package is added. I'm lost. Could someone more knowledgeable about the tooling used in this repo help me here?
My strategy to take this work further is to modernize the tooling first. I'd appreciate it if one of the maintainers could take a look at #735 🙇