Skip to content
This repository was archived by the owner on Sep 10, 2024. It is now read-only.

Commit c142ec7

Browse files
hughnssandhose
authored andcommitted
rename GraphQL API to Internal GraphQL API
1 parent 03b4bd4 commit c142ec7

File tree

5 files changed

+17
-16
lines changed

5 files changed

+17
-16
lines changed

docs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ This documentation has four main sections:
1414

1515
- The [installation guide](./setup/README.md) will guide you through the process of setting up the `matrix-authentication-service` on your own infrastructure.
1616
- The topics sections goes into more details about how the service works, like the [policy engine](./topics/policy.md) and how [authorization sessions](./topics/authorization.md) are managed.
17-
- The reference documentation covers [configuration options](./reference/configuration.md), the [GraphQL API](./reference/graphql.md), the [scopes](./reference/scopes.md) supported by the service, and the [command line interface](./reference/cli/).
17+
- The reference documentation covers [configuration options](./reference/configuration.md), the [Admin API](./api/index.html), the [scopes](./reference/scopes.md) supported by the service, and the [command line interface](./reference/cli/).
1818
- The developer documentation is intended for people who want to [contribute to the project](./development/contributing.md). Developers may also be interested in:
1919
- Technical documentation for individual crates: [`rustdoc`](./rustdoc/mas_handlers/)
2020
- UI components: [`storybook`](./storybook/)

docs/SUMMARY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
# Reference
2727

2828
- [Configuration file reference](./reference/configuration.md)
29-
- [GraphQL API](./reference/graphql.md)
3029
- [Admin API](./api/index.html)
3130
- [OAuth 2.0 scopes](./reference/scopes.md)
3231
- [Command line tool](./reference/cli/README.md)
@@ -42,6 +41,7 @@
4241
- [Contributing](./development/contributing.md)
4342
- [Architecture](./development/architecture.md)
4443
- [Database](./development/database.md)
44+
- [Internal GraphQL API](./development/graphql.md)
4545

4646
---
4747

docs/reference/graphql.md renamed to docs/development/graphql.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
# GraphQL API
1+
# Internal GraphQL API
22

3-
MAS provides a GraphQL API which serves two purposes:
3+
> **Note:** This API used to be the way for external tools to interact with MAS. However, **external usage is now deprecated** in favour of the REST based [Admin API](../topics/admin-api.md). External access to this API will be removed in a future release.
44
5-
- it is used by the self-service user interface (usually accessible on `/account/`), for users to manage their own account.
6-
- it can be used with external tools to manage the service.
5+
MAS uses an internal GraphQL API which is used by the self-service user interface (usually accessible on `/account/`), for users to manage their own account.
76

8-
The endpoint for this API can be discovered through the OpenID Connect discovery document, under the `"org.matrix.matrix-authentication-service.graphql_endpoint` key.
7+
The endpoint for this API can be discovered through the OpenID Connect discovery document, under the `org.matrix.matrix-authentication-service.graphql_endpoint` key.
98
Though it is usually hosted at `https://<mas-host>/graphql`.
109

1110
GraphQL uses [a self-describing schema](https://github.com/matrix-org/matrix-authentication-service/blob/main/frontend/schema.graphql), which means that the API can be explored in tools like the GraphQL Playground.
@@ -23,5 +22,5 @@ With only this scope, the session will be authorized as the user who owns the ac
2322

2423
To get full access to the GraphQL API, the access token must have the [`urn:mas:admin`] scope in addition to the [`urn:mas:graphql:*`] scope.
2524

26-
[`urn:mas:graphql:*`]: ./scopes.md#urnmasgraphql
27-
[`urn:mas:admin`]: ./scopes.md#urnmasadmin
25+
[`urn:mas:graphql:*`]: ../reference/scopes.md#urnmasgraphql
26+
[`urn:mas:admin`]: ../reference/scopes.md#urnmasadmin

docs/topics/admin-api.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
MAS provides a REST-like API for administrators to manage the service.
44
This API is intended to build tools on top of MAS, and is only available to administrators.
55

6+
> **Note:** This Admin API is now the correct way for external tools to interact with MAS. External access to the [Internal GraphQL API](../development/graphql.md) is deprecated and will be removed in a future release.
7+
68
## Enabling the API
79

810
The API isn't exposed by default, and must be added to either a public or a private HTTP listener.
@@ -37,7 +39,7 @@ http:
3739
## Reference documentation
3840
3941
The API is documented using the [OpenAPI specification](https://spec.openapis.org/oas/v3.1.0).
40-
The API schema is avaialble [here](../api/spec.json).
42+
The API schema is available [here](../api/spec.json).
4143
This schema can be viewed in tools like Swagger UI, available [here](../api/).
4244
4345
If admin API is enabled, MAS will also serve the specification at `/api/spec.json`, with a Swagger UI available at `/api/doc/`.
@@ -157,7 +159,7 @@ When querying a list of resources, the response is generally shaped like this:
157159
}
158160
```
159161

160-
The `meta` will have the total numer of items in it, and the `links` object contains the links to the next and previous pages, if any.
162+
The `meta` will have the total number of items in it, and the `links` object contains the links to the next and previous pages, if any.
161163

162164
Pagination is cursor-based, where the ID of items is used as the cursor.
163165
Resources can be paginated forwards using the `page[after]` and `page[first]` parameters, and backwards using the `page[before]` and `page[last]` parameters.

docs/topics/authorization.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,11 @@ the API can be requested by a session which has the [`urn:mas:graphql:*`] and th
8686
MAS supports a few different authorization grants for OAuth 2.0 sessions.
8787
Whilst this section won't go into the technical details of how those grants work, it's important to understand what they are and what they are used for.
8888

89-
| Grant type | Entity | User interaction | Matrix C-S API | Synapse admin API |  MAS GraphQL API |
90-
| --------------------------------------------------- | ------ | ---------------- | -------------- | ----------------- | ---------------- |
91-
| [Authorization code](#authorization-code-grant) | User | Same device | Yes | Yes | Yes |
92-
| [Device authorization](#device-authorization-grant) | User | Other device | Yes | Yes | Yes |
93-
| [Client credentials](#client-credentials-grant) | Client | None | No | No[^admin] | No |
89+
| Grant type | Entity | User interaction | Matrix C-S API | Synapse admin API |  MAS Internal GraphQL API | MAS Admin API |
90+
| --------------------------------------------------- | ------ | ---------------- | -------------- | ----------------- | ------------------------- | ------------- |
91+
| [Authorization code](#authorization-code-grant) | User | Same device | Yes | Yes | Yes | TODO: ? |
92+
| [Device authorization](#device-authorization-grant) | User | Other device | Yes | Yes | Yes | TODO: ? |
93+
| [Client credentials](#client-credentials-grant) | Client | None | No | No[^admin] | No | TODO: ? |
9494

9595
[^admin]: The Synapse admin API doesn't strictly require a user, but Synapse doesn't support client-only sessions yet. In the future, it will be possible to leverage the client credentials grant to access the Synapse admin API.
9696

0 commit comments

Comments
 (0)