-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5004cf3
commit 090d965
Showing
32 changed files
with
637 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# frozen_string_literal: true | ||
|
||
module Mutations | ||
class Echo < BaseMutation | ||
description <<~DOC | ||
A mutation that does not perform any changes. | ||
This is expected to be used for testing of endpoints, to verify | ||
that a user has mutation access. | ||
DOC | ||
|
||
argument :errors, | ||
type: [::GraphQL::Types::String], | ||
required: false, | ||
description: 'Errors to return to the user.' | ||
|
||
argument :message, | ||
type: ::GraphQL::Types::String, | ||
required: false, | ||
description: 'Message to return to the user.' | ||
|
||
field :message, | ||
type: ::GraphQL::Types::String, | ||
null: true, | ||
description: 'Message returned to the user.' | ||
|
||
def resolve(**args) | ||
args | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
title: GraphQL Schema | ||
--- | ||
|
||
The GraphQL Schema is documented on these pages. | ||
|
||
Entrypoint for all queries is the [`Query` type](object/query.md). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
title: Node | ||
--- | ||
|
||
An object with an ID. | ||
|
||
|
||
## Fields without arguments | ||
|
||
| Name | Type | Description | | ||
|------|------|-------------| | ||
| `id` | [`ID!`](../scalar/id.md) | ID of the object. | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
title: echo | ||
--- | ||
|
||
A mutation that does not perform any changes. | ||
|
||
This is expected to be used for testing of endpoints, to verify | ||
that a user has mutation access. | ||
|
||
|
||
## Arguments | ||
|
||
| Name | Type | Description | | ||
|------|------|-------------| | ||
| `clientMutationId` | [`String`](../scalar/string.md) | A unique identifier for the client performing the mutation. | | ||
| `errors` | [`[String!]`](../scalar/string.md) | Errors to return to the user. | | ||
| `message` | [`String`](../scalar/string.md) | Message to return to the user. | | ||
|
||
## Fields | ||
|
||
| Name | Type | Description | | ||
|------|------|-------------| | ||
| `clientMutationId` | [`String`](../scalar/string.md) | A unique identifier for the client performing the mutation. | | ||
| `errors` | [`[String!]!`](../scalar/string.md) | Errors encountered during execution of the mutation. | | ||
| `message` | [`String`](../scalar/string.md) | Message returned to the user. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
title: usersLogin | ||
--- | ||
|
||
Login to an existing user | ||
|
||
## Arguments | ||
|
||
| Name | Type | Description | | ||
|------|------|-------------| | ||
| `clientMutationId` | [`String`](../scalar/string.md) | A unique identifier for the client performing the mutation. | | ||
| `email` | [`String`](../scalar/string.md) | Email of the user | | ||
| `password` | [`String!`](../scalar/string.md) | Password of the user | | ||
| `username` | [`String`](../scalar/string.md) | Username of the user | | ||
|
||
## Fields | ||
|
||
| Name | Type | Description | | ||
|------|------|-------------| | ||
| `clientMutationId` | [`String`](../scalar/string.md) | A unique identifier for the client performing the mutation. | | ||
| `errors` | [`[String!]!`](../scalar/string.md) | Errors encountered during execution of the mutation. | | ||
| `userSession` | [`UserSession`](../object/usersession.md) | The created user session | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
title: usersLogout | ||
--- | ||
|
||
Logout an existing user session | ||
|
||
## Arguments | ||
|
||
| Name | Type | Description | | ||
|------|------|-------------| | ||
| `clientMutationId` | [`String`](../scalar/string.md) | A unique identifier for the client performing the mutation. | | ||
| `userSessionId` | [`UserSessionID!`](../scalar/usersessionid.md) | ID of the session to logout | | ||
|
||
## Fields | ||
|
||
| Name | Type | Description | | ||
|------|------|-------------| | ||
| `clientMutationId` | [`String`](../scalar/string.md) | A unique identifier for the client performing the mutation. | | ||
| `errors` | [`[String!]!`](../scalar/string.md) | Errors encountered during execution of the mutation. | | ||
| `userSession` | [`UserSession`](../object/usersession.md) | The logged out user session | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
title: usersRegister | ||
--- | ||
|
||
Register a new user | ||
|
||
## Arguments | ||
|
||
| Name | Type | Description | | ||
|------|------|-------------| | ||
| `clientMutationId` | [`String`](../scalar/string.md) | A unique identifier for the client performing the mutation. | | ||
| `email` | [`String!`](../scalar/string.md) | Email of the user | | ||
| `password` | [`String!`](../scalar/string.md) | Password of the user | | ||
| `username` | [`String!`](../scalar/string.md) | Username of the user | | ||
|
||
## Fields | ||
|
||
| Name | Type | Description | | ||
|------|------|-------------| | ||
| `clientMutationId` | [`String`](../scalar/string.md) | A unique identifier for the client performing the mutation. | | ||
| `errors` | [`[String!]!`](../scalar/string.md) | Errors encountered during execution of the mutation. | | ||
| `user` | [`User`](../object/user.md) | The created user | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
--- | ||
title: Query | ||
--- | ||
|
||
Root Query type | ||
|
||
## Fields without arguments | ||
|
||
| Name | Type | Description | | ||
|------|------|-------------| | ||
| `currentAuthorization` | [`Authorization`](../union/authorization.md) | Get the currently logged in authorization | | ||
| `currentUser` | [`User`](../object/user.md) | Get the currently logged in user | | ||
|
||
## Fields with arguments | ||
|
||
### echo | ||
|
||
Field available for use to test API access | ||
|
||
Returns [`String!`](../scalar/string.md). | ||
|
||
| Name | Type | Description | | ||
|------|------|-------------| | ||
| `message` | [`String!`](../scalar/string.md) | String to echo as response | | ||
|
||
### node | ||
|
||
Fetches an object given its ID. | ||
|
||
Returns [`Node`](../interface/node.md). | ||
|
||
| Name | Type | Description | | ||
|------|------|-------------| | ||
| `id` | [`ID!`](../scalar/id.md) | ID of the object. | | ||
|
||
### nodes | ||
|
||
Fetches a list of objects given a list of IDs. | ||
|
||
Returns [`[Node]`](../interface/node.md). | ||
|
||
| Name | Type | Description | | ||
|------|------|-------------| | ||
| `ids` | [`[ID!]!`](../scalar/id.md) | IDs of the objects. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
title: User | ||
--- | ||
|
||
Represents a user | ||
|
||
## Fields without arguments | ||
|
||
| Name | Type | Description | | ||
|------|------|-------------| | ||
| `createdAt` | [`Time!`](../scalar/time.md) | Time when this User was created | | ||
| `email` | [`String!`](../scalar/string.md) | Email of the user | | ||
| `id` | [`UserID!`](../scalar/userid.md) | GlobalID of the user | | ||
| `updatedAt` | [`Time!`](../scalar/time.md) | Time when this User was last updated | | ||
| `username` | [`String!`](../scalar/string.md) | Username of the user | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
title: UserSession | ||
--- | ||
|
||
Represents a user session | ||
|
||
## Fields without arguments | ||
|
||
| Name | Type | Description | | ||
|------|------|-------------| | ||
| `active` | [`Boolean!`](../scalar/boolean.md) | Whether or not the session is active and can be used | | ||
| `createdAt` | [`Time!`](../scalar/time.md) | Time when this UserSession was created | | ||
| `id` | [`UserSessionID!`](../scalar/usersessionid.md) | GlobalID of the user | | ||
| `token` | [`String`](../scalar/string.md) | Token belonging to the session, only present on creation | | ||
| `updatedAt` | [`Time!`](../scalar/time.md) | Time when this UserSession was last updated | | ||
| `user` | [`User!`](../object/user.md) | User that belongs to the session | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
title: Boolean | ||
--- | ||
|
||
Represents `true` or `false` values. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
title: ID | ||
--- | ||
|
||
Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) input value will be accepted as an ID. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
title: String | ||
--- | ||
|
||
Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
title: Time | ||
--- | ||
|
||
Time represented in ISO 8601. | ||
|
||
For example: "2023-12-15T17:31:00Z". | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
title: UserID | ||
--- | ||
|
||
A unique identifier for all User entities of the application |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
title: UserSessionID | ||
--- | ||
|
||
A unique identifier for all UserSession entities of the application |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
title: Authorization | ||
--- | ||
|
||
Objects that can present an authorization | ||
|
||
## Possible types | ||
|
||
- [`UserSession`](../object/usersession.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
title: Welcome to the Documentation for Sagittarius | ||
description: Find out how the backend works | ||
template: splash | ||
--- | ||
|
||
import { Card, CardGrid } from '@astrojs/starlight/components'; | ||
|
||
Sagittarius provides a GraphQL API. | ||
|
||
<CardGrid stagger> | ||
<Card title='<a href="graphql/">GraphQL Schema</a>' icon="document"> | ||
View the documentation for the graphql schema. | ||
</Card> | ||
</CardGrid> | ||
|
Oops, something went wrong.