1.7.10 • Published 9 days ago

github-schema v1.7.10

Weekly downloads
-
License
MIT
Repository
github
Last release
9 days ago

📋 github-schema

npm version npm downloads

GitHub's GraphQL Schema

📦 Installation

npm install github-schema

📚 Usage

import { gql, gqlTyped } from 'github-schema'

// we are also exporting a ton of types from the graphql schema.

const REPOSITORY_QUERY = gql`
  query getRepository($owner: String!, $name: String!) {
    repository(owner: $owner, name: $name) {
      nameWithOwner
      description
      pushedAt
      url
      defaultBranchRef {
        name
      }
      languages(first: 1, orderBy: { field: SIZE, direction: DESC }) {
        nodes {
          name
          color
        }
      }
    }
  }
`

!NOTE If you want to use gql with return type of DocumentNode you can do something like this:

import { gqlTyped } from 'github-schema'

Editor Autocompletion

!TIP You will need to have GraphQL LSP installed, and have a .graphqlrc.yaml file in your project root. If you also want nice colors, i would recommend GraphQL Syntax Highlighting installed.

# .graphqlrc.yaml
schema: node_modules/github-schema/schema.graphql

📄 License

Published under MIT License.

1.7.10

9 days ago

1.7.9

19 days ago

1.7.8

1 month ago

1.7.7

2 months ago

1.7.5

2 months ago

1.7.4

2 months ago

1.7.3

2 months ago

1.7.2

2 months ago

1.7.1

3 months ago

1.7.0

3 months ago

1.6.5

3 months ago

1.6.3

3 months ago

1.6.2

4 months ago

1.6.1

4 months ago

1.5.1

4 months ago

1.5.0

4 months ago

1.4.1

4 months ago

1.4.0

5 months ago

1.2.0

6 months ago

1.1.1

6 months ago

1.1.0

6 months ago

1.2.5

5 months ago

1.2.4

6 months ago

1.1.5

6 months ago

1.2.3

6 months ago

1.1.4

6 months ago

1.3.1

5 months ago

1.1.3

6 months ago

1.1.2

6 months ago

1.0.0

8 months ago