Skip to content

Latest commit

 

History

History
47 lines (36 loc) · 875 Bytes

graphql.md

File metadata and controls

47 lines (36 loc) · 875 Bytes

GraphQL

한국어

Generate

$ oct generate graphql --help
Option Env. Variable Description
-i, --input OCTOPUS_INPUT Octopus schema file to read
-o, --output OCTOPUS_OUTPUT Target directory
-p, --graphqlPackage OCTOPUS_GRAPHQL_PACKAGE Target graphql package name

Example

$ oct generate graphql \
    --input examples/user.json \
    --output output/graphql

Generated *.graphql file:

schema {
  query: Query
}

type Query {
  userGroups: [UserGroup]
  users: [User]
}

type UserGroup {
  id: ID!
  name: String!
}

type User {
  id: ID!
  name: String!
  groupId: Int
}