Skip to content

Commit

Permalink
docs/graphql: non-nullable id argument and typo fix.
Browse files Browse the repository at this point in the history
This commit fixes a typo in the GraphQL tutorial, and changes the
`optional` ID field to `required`, to better mimic real world usage.

Corresponding PR in the tutorial code repo: StyraInc/graphql-apollo-example#2

Co-authored-by: @dreglad
Signed-off-by: Philip Conrad <[email protected]>
  • Loading branch information
philipaconrad authored and ashutosh-narkar committed Jan 30, 2023
1 parent 4f72acf commit ea06d89
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/content/graphql-api-authorization.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ schema {
}

type Query {
employeeByID(id: String): Employee
employeeByID(id: String!): Employee
}
```

Every GraphQL service has a `query` type, and may or may not have a `mutation` type.
These types are special because they define the entry points of *every* GraphQL query for the API covered by that schema.

For our example above, we've defined exactly one query entry point, the parameterized query `user(id: Int)`.
For our example above, we've defined exactly one query entry point, the parameterized query `employeeByID(id: String!)`.

### 2. Create a policy bundle.

Expand Down

0 comments on commit ea06d89

Please sign in to comment.