From ba809811a3fcec1d031e21a523dbd429fb4b700f Mon Sep 17 00:00:00 2001 From: Wolfgang Ziegler // fago Date: Sun, 6 Oct 2024 22:22:51 -0700 Subject: [PATCH] improve: add basic docs about JSON-API and GraphQL --- .../3.advanced-topics/30.jsonapi-graphql.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/content/3.advanced-topics/30.jsonapi-graphql.md b/content/3.advanced-topics/30.jsonapi-graphql.md index 264ed08..a704fb1 100644 --- a/content/3.advanced-topics/30.jsonapi-graphql.md +++ b/content/3.advanced-topics/30.jsonapi-graphql.md @@ -1,3 +1,20 @@ # JSON-API & GraphQL -TODO: explain relationship. references +When data needs to be queried or updated from the frontend, Drupal offers plenty of options. Lupus Decoupled Drupal's provided API may be combined with any of those: + +## JSON-API + +Drupal provides complete RESTful JSON-API module, which is included with Drupal core and works with all Drupal entities (and its access system) out-of-the-box. Following are the most relevant resources to get started: + + * [Documentation](https://www.drupal.org/docs/core-modules-and-themes/core-modules/jsonapi-module + ) + * [jsonapi-client npm package](https://www.npmjs.com/package/@drupal-api-client/json-api-client) + * [Json:API Extras module](https://www.drupal.org/project/jsonapi_extras) - Configure which entities are exposed + * [Simple OAuth](https://www.drupal.org/project/simple_oauth) - Authenticate requests via API token + +## GraphQL + +Alternatively, there are Drupal extension modules that add GraphQL support: + + * [GraphQL module](https://www.drupal.org/project/graphql/) + * [GraphQL compose](https://www.drupal.org/project/graphql_compose)