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

Add option to pluck from custom Vue block #4439

Merged
merged 4 commits into from
May 14, 2024

Conversation

jaschaephraim
Copy link
Contributor

Description

  • Adds support for graphql-tag-pluck to pluck raw GraphQL from a custom Vue block.
  • Adds an option gqlVueBlock (defaults to undefined) to specify the name of the custom block. The feature has no impact if this option is not set.
  • The parsing of Vue blocks is already being done by the Vue parser, so this requires no additional dependencies or algorithms.
  • Includes a new test and small documentation update.
  • Very minimal refactoring was done to keep DRY.

Related #4320

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • 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):

https://imgur.com/a/383F8uM

How Has This Been Tested?

  • Unit test included in PR
  • Fork currently in use in a personal project with graphql-codegen, see env info below

Test Environment:

  • OS: Ubuntu
  • NodeJS: v16.15.0
  • @graphql-codegen/cli: v2.6.2
  • @graphql-codegen/introspection: v2.1.1
  • @graphql-codegen/typescript: v2.4.7
  • @graphql-codegen/typescript-operations: v2.3.4
  • @graphql-codegen/typescript-urql-graphcache: v2.2.8
  • @graphql-codegen/typescript-vue-urql: v2.2.8

Checklist:

  • I have followed the CONTRIBUTING doc and the style guidelines of this project
  • 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
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests and linter rules pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@changeset-bot
Copy link

changeset-bot bot commented May 4, 2022

🦋 Changeset detected

Latest commit: 6067ee6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@graphql-tools/graphql-tag-pluck Patch
@graphql-tools/code-file-loader Patch
@graphql-tools/git-loader Patch

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

@vercel
Copy link

vercel bot commented May 4, 2022

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

Name Status Preview Updated
graphql-tools ✅ Ready (Inspect) Visit Preview May 4, 2022 at 10:29PM (UTC)

@ardatan ardatan merged commit ee0daab into ardatan:master May 14, 2024
5 checks passed
@ardatan
Copy link
Owner

ardatan commented May 14, 2024

Sorry for the late review! :) Thanks for the PR!

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.

2 participants