Skip to content

Schemas and Types: minor fixes #762

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
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
16 changes: 8 additions & 8 deletions site/learn/Learn-Schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ type Starship {
}
```

All arguments are named. Unlike languages like JavaScript and Python where functions take a list of ordered arguments, all arguments in GraphQL are passed by name specifically. In this case, the `length` field has one defined argument, `unit`.
All arguments are named. Unlike languages like JavaScript and PHP where functions take a list of ordered arguments, all arguments in GraphQL are passed by name specifically. In this case, the `length` field has one defined argument, `unit`.

Arguments can be either required or optional. When an argument is optional, we can define a _default value_ - if the `unit` argument is not passed, it will be set to `METER` by default.

Expand Down Expand Up @@ -233,8 +233,8 @@ For example, you could have an interface `Character` that represents any charact
interface Character {
id: ID!
name: String!
friends: [Character]
appearsIn: [Episode]!
friends: [Character!]
appearsIn: [Episode!]!
}
```

Expand All @@ -246,17 +246,17 @@ For example, here are some types that might implement `Character`:
type Human implements Character {
id: ID!
name: String!
friends: [Character]
appearsIn: [Episode]!
starships: [Starship]
friends: [Character!]
appearsIn: [Episode!]!
starships: [Starship!]
totalCredits: Int
}

type Droid implements Character {
id: ID!
name: String!
friends: [Character]
appearsIn: [Episode]!
friends: [Character!]
appearsIn: [Episode!]!
primaryFunction: String
}
```
Expand Down