0.7.20 • Published 14 days ago

@anchan828/gen-graphql-relay-schema v0.7.20

Weekly downloads
565
License
MIT
Repository
github
Last release
14 days ago

@anchan828/gen-graphql-relay-schema

Description

Auto generation for relay type

Quick Start

import { genRelayTypes } from "@anchan828/gen-graphql-relay-schema";
import { buildASTSchema, printSchema } from "graphql";

const schema = `

type Project {
    id: ID
}

type Query {
    projects: [Project] @relay
}

`;

printSchema(buildASTSchema(genRelayTypes(schema)));
//=>  """A connection for relay"""
//    interface Connection {
//      """Identifies the total count of items in the connection."""
//      totalCount: Int
//
//      """Information to aid in pagination."""
//      pageInfo: PageInfo!
//
//      """A list of edges."""
//      edges: [Edge]
//    }
//
//    """An edge in a connection."""
//    interface Edge {
//      """A cursor for use in pagination."""
//      cursor: String
//    }
//
//    """An object with an ID."""
//    interface Node {
//      """ID of the object."""
//      id: ID!
//    }
//
//    """Information about pagination in a connection."""
//    type PageInfo {
//      """When paginating backwards, the cursor to continue."""
//      startCursor: String
//
//      """When paginating forwards, the cursor to continue."""
//      endCursor: String
//
//      """When paginating forwards, are there more items?"""
//      hasNextPage: Boolean
//
//      """When paginating backwards, are there more items?"""
//      hasPreviousPage: Boolean
//    }
//
//    type Project implements Node {
//      id: ID
//    }
//
//    """The connection type for Project"""
//    type ProjectConnection implements Connection {
//      """Identifies the total count of Project items in the connection."""
//      totalCount: Int
//
//      """A list of ProjectEdge."""
//      edges: [ProjectEdge]
//
//      """Information to aid in pagination."""
//      pageInfo: PageInfo!
//    }
//
//    """An edge in a ProjectConnection."""
//    type ProjectEdge implements Edge {
//      """The item at the end of the edge."""
//      node: Project
//
//      """A cursor for use in pagination."""
//      cursor: String
//    }
//
//    type Query {
//      projects(before: String, after: String, first: Int, last: Int): ProjectConnection
//    }

License

MIT.

0.7.20

14 days ago

0.7.19

21 days ago

0.7.18

28 days ago

0.7.17

1 month ago

0.7.11

2 months ago

0.7.10

3 months ago

0.7.13

2 months ago

0.7.12

2 months ago

0.7.15

1 month ago

0.7.14

2 months ago

0.7.16

1 month ago

0.7.9

3 months ago

0.7.8

3 months ago

0.7.2

5 months ago

0.7.1

5 months ago

0.7.4

4 months ago

0.7.3

4 months ago

0.7.0

5 months ago

0.6.43

6 months ago

0.6.42

6 months ago

0.6.45

5 months ago

0.6.44

5 months ago

0.7.6

4 months ago

0.7.5

4 months ago

0.7.7

3 months ago

0.6.41

6 months ago

0.6.40

6 months ago

0.6.39

7 months ago

0.6.38

7 months ago

0.6.37

7 months ago

0.6.36

7 months ago

0.6.34

8 months ago

0.6.35

7 months ago

0.6.33

8 months ago

0.6.32

8 months ago

0.6.31

8 months ago

0.6.30

9 months ago

0.6.29

9 months ago

0.6.28

9 months ago

0.6.27

9 months ago

0.6.26

10 months ago

0.6.25

10 months ago

0.6.24

10 months ago

0.6.23

10 months ago

0.6.22

10 months ago

0.6.21

11 months ago

0.6.20

11 months ago

0.6.19

11 months ago

0.6.18

11 months ago

0.6.17

12 months ago

0.6.16

12 months ago

0.6.15

12 months ago

0.6.14

1 year ago

0.6.13

1 year ago

0.6.10

1 year ago

0.6.12

1 year ago

0.6.11

1 year ago

0.6.9

1 year ago

0.6.8

1 year ago

0.6.7

1 year ago

0.6.6

1 year ago

0.6.5

1 year ago

0.6.4

1 year ago

0.6.3

1 year ago

0.6.0

1 year ago

0.5.30

1 year ago

0.5.29

1 year ago

0.5.28

1 year ago

0.5.27

1 year ago

0.5.26

2 years ago

0.5.25

2 years ago

0.5.24

2 years ago

0.5.23

2 years ago

0.5.22

2 years ago

0.5.21

2 years ago

0.5.20

2 years ago

0.5.19

2 years ago

0.5.18

2 years ago

0.5.17

2 years ago

0.5.16

2 years ago

0.5.15

2 years ago

0.5.14

2 years ago

0.5.13

2 years ago

0.5.9

2 years ago

0.5.8

2 years ago

0.5.7

2 years ago

0.5.6

2 years ago

0.5.0

2 years ago

0.4.0

2 years ago

0.3.8

2 years ago

0.3.7

2 years ago

0.3.6

2 years ago

0.3.5

2 years ago

0.3.4

2 years ago

0.3.3

2 years ago

0.3.0

2 years ago

0.3.2

2 years ago

0.3.1

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.1.39

2 years ago

0.1.38

2 years ago

0.1.37

3 years ago

0.1.36

3 years ago

0.1.35

3 years ago

0.1.34

3 years ago

0.1.33

3 years ago

0.1.31

3 years ago

0.1.30

3 years ago

0.1.29

3 years ago

0.1.25

3 years ago

0.1.24

3 years ago

0.1.23

3 years ago

0.1.21

3 years ago

0.1.18

3 years ago

0.1.15

3 years ago

0.1.13

3 years ago

0.1.12

3 years ago

0.1.11

3 years ago

0.1.10

3 years ago

0.1.9

3 years ago

0.1.8

3 years ago

0.1.7

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago