Skip to content
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

MicroProfile GraphQL: Minor update to README and add missing @NonNull on TaskApi #3091

Merged
merged 1 commit into from
Jun 9, 2021
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
8 changes: 4 additions & 4 deletions examples/microprofile/graphql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,18 @@ Access the `/graphql` endpoint via `http://127.0.0.1:7001/graphql`:
```graphql
type Mutation {
"Create a task with the given description"
createTask(description: String): Task
createTask(description: String!): Task
"Remove all completed tasks and return the tasks left"
deleteCompletedTasks: [Task]
"Delete a task and return the deleted task details"
deleteTask(id: String): Task
deleteTask(id: String!): Task
"Update a task"
updateTask(completed: Boolean, description: String, id: String): Task
updateTask(completed: Boolean, description: String, id: String!): Task
}

type Query {
"Return a given task"
findTask(id: String): Task
findTask(id: String!): Task
"Query tasks and optionally specified only completed"
tasks(completed: Boolean): [Task]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public class TaskApi {
*/
@Mutation
@Description("Create a task with the given description")
public Task createTask(@Name("description") String description) {
public Task createTask(@Name("description") @NonNull String description) {
if (description == null) {
throw new IllegalArgumentException("Description must be provided");
}
Expand Down