Skip to content

Upcoming Release Changes #260

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

Merged
merged 1 commit into from
Feb 14, 2023
Merged

Upcoming Release Changes #260

merged 1 commit into from
Feb 14, 2023

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Feb 9, 2023

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

@graphql-codegen/[email protected]

Minor Changes

  • #70 e6e85a999 Thanks @aplr! - Make typescript-generic-sdk respect the documentMode external option by prefixing types with the value configured in importOperationTypesFrom as documented.

@graphql-codegen/[email protected]

Patch Changes

  • #269 d28569b9a Thanks @plmercereau! - Initial release

    The typescript-nhost plugin generates the schema for the Typescript Nhost SDK.

    What the plugin does:

    • Generate types with graphql-codegem/typescript, following a strict configuration. (the plugin does not require @graphql-codegen/typescript to be installed by the user but is use as a dependency).
    • Minify the introspection object with '@urql/introspection
    • Export the introspection object as well as all the types so they can be accessed through a default import schema from './generated-schema'

    Installation

    yarn add -D @graphql-codegen/cli @graphql-codegen/typescript-nhost

    Then configure the code generator by adding a codegen.yaml file:

    schema:
      - http://localhost:1337/v1/graphql:
          headers:
            x-hasura-admin-secret: nhost-admin-secret
    generates:
      ./src/schema.ts:
        plugins:
          - typescript-nhost

    Usage

    yarn add @nhost/nhost-js
    import { NhostClient } from '@nhost/nhost-js';
    import schema from './schema';
    
    const nhost = new NhostClient({ subdomain: 'localhost', schema });

    A GraphQL query named todos will then be accessible through:

    const todos = await nhost.graphql.query.todos({ select: { contents: true } });

    The todos object will be strongly typed based on the GraphQL schema, and the fields that would have been selected in the query.

@graphql-codegen/[email protected]

Patch Changes

  • #248 98d3da6b1 Thanks @DominicGBauer! - fix: update imported api to use alternate name

    Previously imported api name did not update actual implementation

    import { newApiName } from '../baseApi'
    
    ...
    const injectedApi = oldApiName...
    
    

    now it does update the implementation

    import { newApiName } from '../baseApi'
    
    ...
    const injectedApi = newApiName...
    ...
    

@github-actions github-actions bot force-pushed the changeset-release/main branch 6 times, most recently from 900c074 to 8716e63 Compare February 14, 2023 17:23
@github-actions github-actions bot force-pushed the changeset-release/main branch from 8716e63 to 7fc0d3e Compare February 14, 2023 17:23
@saihaj saihaj merged commit b7ac516 into main Feb 14, 2023
@saihaj saihaj deleted the changeset-release/main branch February 14, 2023 19:42
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