Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/language/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,13 @@ export interface ParseOptions {
*
* const document = parse(
* `
* {
* t { ...A(var: true) }
* }
* fragment A($var: Boolean = false) on T {
* name
* }
* `,
* {
* t { ...A(var: true) }
* }
* fragment A($var: Boolean = false) on T {
* name
* }
* `,
* {
* experimentalFragmentArguments: true,
* maxTokens: 80,
Expand Down
16 changes: 8 additions & 8 deletions website/pages/docs/constructing-types.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ import { createHandler } from 'graphql-http/lib/use/express';
import { buildSchema } from 'graphql';

const schema = buildSchema(`
type User {
id: String
name: String
}

type Query {
user(id: String): User
}
type User {
id: String
name: String
}

type Query {
user(id: String): User
}
`);

// Maps id to User object
Expand Down
34 changes: 17 additions & 17 deletions website/pages/docs/mutations-and-input-types.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -253,26 +253,26 @@ const fakeDatabase = {};

// Construct a schema, using GraphQL schema language
const schema = buildSchema(`
input MessageInput {
content: String
author: String
}
input MessageInput {
content: String
author: String
}

type Message {
id: ID!
content: String
author: String
}
type Message {
id: ID!
content: String
author: String
}

type Query {
getMessage(id: ID!): Message
getMessages: [Message]
}
type Query {
getMessage(id: ID!): Message
getMessages: [Message]
}

type Mutation {
createMessage(input: MessageInput): Message
updateMessage(id: ID!, input: MessageInput): Message
}
type Mutation {
createMessage(input: MessageInput): Message
updateMessage(id: ID!, input: MessageInput): Message
}
`);

// If Message had any complex fields, we'd put them on this object.
Expand Down
16 changes: 8 additions & 8 deletions website/pages/docs/object-types.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -265,15 +265,15 @@ import { buildSchema } from 'graphql';

// Construct a schema, using GraphQL schema language
const schema = buildSchema(`
type RandomDie {
numSides: Int!
rollOnce: Int!
roll(numRolls: Int!): [Int]
}
type RandomDie {
numSides: Int!
rollOnce: Int!
roll(numRolls: Int!): [Int]
}

type Query {
getDie(numSides: Int): RandomDie
}
type Query {
getDie(numSides: Int): RandomDie
}
`);

// This class implements the RandomDie GraphQL type
Expand Down
Loading