graphql-code-generator icon indicating copy to clipboard operation
graphql-code-generator copied to clipboard

New Typescript plugin for Tql

Open ivasilov opened this issue 2 years ago • 3 comments

Description

Hello, I've tried to write a Typescript plugin which generates the needed code for a query builder based on tql. I would like to get initial comments on this plugin and get it up to par on code quality with the other plugins.

The code is definitely not ready to be merged, I couldn't get the tests to run.

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)
  • [x] This change requires a documentation update

How Has This Been Tested?

I've run the plugin on my own schema and it generates code which can be used for query building.

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
  • [ ] I have commented my code, particularly in hard-to-understand areas
  • [ ] I have made corresponding changes to the documentation
  • [x] My changes generate no new warnings
  • [ ] 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
  • [x] Any dependent changes have been merged and published in downstream modules

Further comments

I need help with adding tests. I'm getting

Jest encountered an unexpected token

Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax.

Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration.

By default "node_modules" folder is ignored by transformers.

when trying to run tests from my own package (tried running the tests from other packages, got the same result).

ivasilov avatar Apr 25 '22 15:04 ivasilov

⚠️ No Changeset found

Latest commit: 5fccb217011f0129ff4f0b4fb0baff60cd999352

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

changeset-bot[bot] avatar Apr 25 '22 15:04 changeset-bot[bot]

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
graphql-code-generator ✅ Ready (Inspect) Visit Preview Apr 25, 2022 at 3:28PM (UTC)

vercel[bot] avatar Apr 25 '22 15:04 vercel[bot]

HI @ivasilov,

Thank you for your contribution! ⚡ Do you still plan to release this new plugin?

If so, could you please rebase/update your branch, run the tests locally and run yarn changeset?

Thank you!

charlypoly avatar Aug 04 '22 11:08 charlypoly

Hi!

All community plugins (see list below) have been moved to a new dotansimha/graphql-code-generator-community.

Community plugins:
  • @graphql-codegen/typescript-react-apollo
  • @graphql-codegen/typescript-graphql-request
  • @graphql-codegen/typescript-apollo-angular
  • @graphql-codegen/typescript-apollo-client-helpers
  • @graphql-codegen/typescript-react-query
  • @graphql-codegen/typescript-urql
  • @graphql-codegen/named-operations-object
  • @graphql-codegen/urql-introspection
  • @graphql-codegen/flow-resolvers
  • @graphql-codegen/typescript-vue-apollo
  • @graphql-codegen/typescript-rtk-query
  • @graphql-codegen/flow-operations
  • @graphql-codegen/typescript-msw
  • @graphql-codegen/typescript-mongodb
  • @graphql-codegen/typescript-type-graphql
  • @graphql-codegen/jsdoc
  • @graphql-codegen/typescript-vue-urql
  • @graphql-codegen/kotlin
  • @graphql-codegen/typescript-vue-apollo-smart-ops
  • @graphql-codegen/java
  • @graphql-codegen/c-sharp-operations
  • @graphql-codegen/hasura-allow-list
  • @graphql-codegen/typescript-stencil-apollo
  • @graphql-codegen/relay-operation-optimizer
  • @graphql-codegen/typescript-oclif
  • @graphql-codegen/java-resolvers
  • @graphql-codegen/java-apollo-android
  • @graphql-codegen/flutter-freezed

Please move your PR by following these steps:

From your current PR branch:

  • Fork the https://github.com/dotansimha/graphql-code-generator-community repository
  • git remote add codegen-community <GIT_URL_OF_YOUR_COMMUNITY_REPO_FORK>
  • git fetch codegen-community
  • git push codegen-community

Open the PR on dotansimha/graphql-code-generator-community and close this PR.

Thank you!

charlypoly avatar Nov 07 '22 10:11 charlypoly

Hey @ivasilov 👋 If you wish to continue work on this, follow the steps provided here: https://github.com/dotansimha/graphql-code-generator/pull/7793#issuecomment-1305397389.

beerose avatar Mar 28 '23 18:03 beerose