Skip to content

[FEAT]: Export schema.graphql and schema.json directly #1047

@bluwy

Description

@bluwy

Describe the need

It'd be nice to be able to import @octokit/graphql-schema/schema.graphql and @octokit/graphql-schema/schema.json, which should mean adding this to the package.json:

{
  "exports": {
    "./schema.graphql": "./schema.graphql",
    "./schema.json": "./schema.json"
  }
}

This would allow to reference the file directly for @graphql-codegen/cli:

import type { CodegenConfig } from "@graphql-codegen/cli";

const config: CodegenConfig = {
  schema: import.meta.resolve("@octokit/graphql-schema/schema.graphql"),
};

export default config;

SDK Version

No response

API Version

No response

Relevant log output

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: TriageThis is being looked at and prioritizedType: FeatureNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    🆕 Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions