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

Update graphqlcodegenerator monorepo #95

Closed
wants to merge 3 commits into from

Conversation

renovate[bot]
Copy link

@renovate renovate bot commented Mar 31, 2023

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@graphql-codegen/cli 2.16.2 -> 2.16.5 age adoption passing confidence
@graphql-codegen/cli 3.0.0 -> 3.3.1 age adoption passing confidence
@graphql-codegen/client-preset 1.2.4 -> 1.3.0 age adoption passing confidence

⚠ Dependency Lookup Warnings ⚠

Warnings were logged while processing this repo. Please check the Dependency Dashboard for more information.


Release Notes

dotansimha/graphql-code-generator (@​graphql-codegen/cli)

v2.16.5

Compare Source

Patch Changes

v2.16.4

Compare Source

Patch Changes

v2.16.3

Compare Source

Patch Changes
dotansimha/graphql-code-generator (@​graphql-codegen/client-preset)

v1.3.0

Compare Source

Minor Changes
  • #​8757 4f290aa72 Thanks @​n1ru4l! - Add support for persisted documents.

    You can now generate and embed a persisted documents hash for the executable documents.

    /** codegen.ts */
    import { CodegenConfig } from '@​graphql-codegen/cli';
    
    const config: CodegenConfig = {
      schema: 'https://swapi-graphql.netlify.app/.netlify/functions/index',
      documents: ['src/**/*.tsx'],
      ignoreNoDocuments: true, // for better experience with the watcher
      generates: {
        './src/gql/': {
          preset: 'client',
          plugins: [],
          presetConfig: {
            persistedDocuments: true,
          },
        },
      },
    };
    
    export default config;

    This will generate ./src/gql/persisted-documents.json (dictionary of hashes with their operation string).

    In addition to that each generated document node will have a __meta__.hash property.

    import { gql } from './gql.js';
    
    const allFilmsWithVariablesQueryDocument = graphql(/* GraphQL */ `
      query allFilmsWithVariablesQuery($first: Int!) {
        allFilms(first: $first) {
          edges {
            node {
              ...FilmItem
            }
          }
        }
      }
    `);
    
    console.log((allFilmsWithVariablesQueryDocument as any)['__meta__']['hash']);
  • #​8757 4f290aa72 Thanks @​n1ru4l! - Add support for embedding metadata in the document AST.

    It is now possible to embed metadata (e.g. for your GraphQL client within the emitted code).

    /** codegen.ts */
    import { CodegenConfig } from '@​graphql-codegen/cli';
    
    const config: CodegenConfig = {
      schema: 'https://swapi-graphql.netlify.app/.netlify/functions/index',
      documents: ['src/**/*.tsx'],
      ignoreNoDocuments: true, // for better experience with the watcher
      generates: {
        './src/gql/': {
          preset: 'client',
          plugins: [],
          presetConfig: {
            onExecutableDocumentNode(documentNode) {
              return {
                operation: documentNode.definitions[0].operation,
                name: documentNode.definitions[0].name.value,
              };
            },
          },
        },
      },
    };
    
    export default config;

    You can then access the metadata via the __meta__ property on the document node.

    import { gql } from './gql.js';
    
    const allFilmsWithVariablesQueryDocument = graphql(/* GraphQL */ `
      query allFilmsWithVariablesQuery($first: Int!) {
        allFilms(first: $first) {
          edges {
            node {
              ...FilmItem
            }
          }
        }
      }
    `);
    
    console.log((allFilmsWithVariablesQueryDocument as any)['__meta__']);
Patch Changes

v1.2.6

Compare Source

Patch Changes

v1.2.5

Compare Source

Patch Changes

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@renovate
Copy link
Author

renovate bot commented Mar 31, 2023

⚠ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: package-lock.json
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/collaborrate-docs-generator - Not found
npm ERR! 404 
npm ERR! 404  'collaborrate-docs-generator@^0.6.0' is not in this registry.
npm ERR! 404 
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in: /tmp/worker/1f31d9/56c602/cache/others/npm/_logs/2023-07-09T08_04_27_884Z-debug-0.log

@netlify
Copy link

netlify bot commented Mar 31, 2023

Deploy Preview for alternatedemo failed.

Name Link
🔨 Latest commit e480c49
🔍 Latest deploy log https://app.netlify.com/sites/alternatedemo/deploys/64275097af9c370008b95438

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.

1 participant