diff --git a/site/learn/Learn-Schema.md b/site/learn/Learn-Schema.md index 40a5b7ced5..4479ffbafd 100644 --- a/site/learn/Learn-Schema.md +++ b/site/learn/Learn-Schema.md @@ -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. @@ -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!]! } ``` @@ -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 } ```