Skip to content

Commit 9d51418

Browse files
authored
Argument need not be optional to have a default value defined
1 parent f34954d commit 9d51418

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pages/learn/schema.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ type Starship {
6363

6464
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`.
6565

66-
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.
66+
Arguments can be either required or optional. We can define a _default value_ for an argument as well - if the `unit` argument is not passed, it will be set to `METER` by default.
6767

6868
## The Query and Mutation types
6969

0 commit comments

Comments
 (0)