From 3a4334cb9133523652e30d8ab0b8a910bf2a4aaf Mon Sep 17 00:00:00 2001 From: Benjie Gillam Date: Mon, 23 May 2022 17:04:43 +0100 Subject: [PATCH 1/7] GraphQL Composite Schemas RFC --- rfcs/CompositeSchemas.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 rfcs/CompositeSchemas.md diff --git a/rfcs/CompositeSchemas.md b/rfcs/CompositeSchemas.md new file mode 100644 index 00000000..773fc70b --- /dev/null +++ b/rfcs/CompositeSchemas.md @@ -0,0 +1,30 @@ +# RFC: GraphQL Composite Schemas + +There's a _lot_ of different ways of combining multiple GraphQL schemas together to form a larger composite schema, and the wide variety of options can make it challenging to design schemas in a way that will be easy to compose later. To name but a few approaches: + +* Schema merging and stitching (various implementations in many languages) +* GraphQL modules and other "extend type"-based approaches +* Federation (Apollo's v1 and v2, Mercurius, WunderGraph, Hot Chocolate, etc) +* Hasura's GraphQL Joins + +Though these are all separate solutions to similar problems, there are various concerns that most of them have to consider: + +* Identifying the schemas to join +* Discovering/defining the relationships between the types/schemas +* Schema manipulation to avoid conflicts (e.g. renaming types/fields) +* Declaring which schemas "own" a particular type, and detecting conflicts +* Detecting breaking changes +* Actually fetching the relevant data, and combining it to fulfil the GraphQL request +* etc + +Not wanting to cause an [XKCD#927](https://xkcd.com/927/) situation… + +![XKCD 927](https://user-images.githubusercontent.com/129910/166689080-bc45979a-6e70-4d4f-9bcc-f8f3daea1ee6.png) + +… but, it feels like it would be of benefit to the ecosystem at large if there were a shared specification that covers a few of these needs. + +If this is of interest to you, please enter your name, GitHub handle, and organization below: + +| Name | GitHub | Organization | Location +| :----------------- | :-------------- | :----------------- | :----------------- +| Benjie Gillam | Benjie | Graphile | Chandler's Ford, UK From 84825558e764b59dfc81537278628de7e57a68d3 Mon Sep 17 00:00:00 2001 From: Benjie Gillam Date: Mon, 23 May 2022 17:23:14 +0100 Subject: [PATCH 2/7] Update CompositeSchemas.md --- rfcs/CompositeSchemas.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/rfcs/CompositeSchemas.md b/rfcs/CompositeSchemas.md index 773fc70b..66481452 100644 --- a/rfcs/CompositeSchemas.md +++ b/rfcs/CompositeSchemas.md @@ -17,11 +17,7 @@ Though these are all separate solutions to similar problems, there are various c * Actually fetching the relevant data, and combining it to fulfil the GraphQL request * etc -Not wanting to cause an [XKCD#927](https://xkcd.com/927/) situation… - -![XKCD 927](https://user-images.githubusercontent.com/129910/166689080-bc45979a-6e70-4d4f-9bcc-f8f3daea1ee6.png) - -… but, it feels like it would be of benefit to the ecosystem at large if there were a shared specification that covers a few of these needs. +It feels like it would be of benefit to the ecosystem at large if there were a shared specification that covers a few of these needs. If this is of interest to you, please enter your name, GitHub handle, and organization below: From 051a10076a2882d1bcf7a5c6942ba6662188d772 Mon Sep 17 00:00:00 2001 From: Michael Staib Date: Fri, 27 May 2022 09:36:51 +0200 Subject: [PATCH 3/7] Added Michael Staib --- rfcs/CompositeSchemas.md | 1 + 1 file changed, 1 insertion(+) diff --git a/rfcs/CompositeSchemas.md b/rfcs/CompositeSchemas.md index 66481452..29d83363 100644 --- a/rfcs/CompositeSchemas.md +++ b/rfcs/CompositeSchemas.md @@ -24,3 +24,4 @@ If this is of interest to you, please enter your name, GitHub handle, and organi | Name | GitHub | Organization | Location | :----------------- | :-------------- | :----------------- | :----------------- | Benjie Gillam | Benjie | Graphile | Chandler's Ford, UK +| Michael Staib | michaelstaib | ChilliCream Inc. | Zurich, CH From d3f5fe3ac1aa26f1b88198c7ead596e6ecac4ca8 Mon Sep 17 00:00:00 2001 From: Benjie Gillam Date: Fri, 27 May 2022 11:23:22 +0100 Subject: [PATCH 4/7] Add Matteo Co-authored-by: Matteo Collina --- rfcs/CompositeSchemas.md | 1 + 1 file changed, 1 insertion(+) diff --git a/rfcs/CompositeSchemas.md b/rfcs/CompositeSchemas.md index 29d83363..a554f88c 100644 --- a/rfcs/CompositeSchemas.md +++ b/rfcs/CompositeSchemas.md @@ -25,3 +25,4 @@ If this is of interest to you, please enter your name, GitHub handle, and organi | :----------------- | :-------------- | :----------------- | :----------------- | Benjie Gillam | Benjie | Graphile | Chandler's Ford, UK | Michael Staib | michaelstaib | ChilliCream Inc. | Zurich, CH +| Matteo Collina | mcollina | NearForm | Forlì, IT From 64f20002732b17f2eb4b6bd45a392cad08d28cb0 Mon Sep 17 00:00:00 2001 From: Benjie Gillam Date: Fri, 27 May 2022 11:25:41 +0100 Subject: [PATCH 5/7] Update bullets based on feedback --- rfcs/CompositeSchemas.md | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/rfcs/CompositeSchemas.md b/rfcs/CompositeSchemas.md index a554f88c..c6ee7ca7 100644 --- a/rfcs/CompositeSchemas.md +++ b/rfcs/CompositeSchemas.md @@ -2,20 +2,21 @@ There's a _lot_ of different ways of combining multiple GraphQL schemas together to form a larger composite schema, and the wide variety of options can make it challenging to design schemas in a way that will be easy to compose later. To name but a few approaches: -* Schema merging and stitching (various implementations in many languages) -* GraphQL modules and other "extend type"-based approaches -* Federation (Apollo's v1 and v2, Mercurius, WunderGraph, Hot Chocolate, etc) -* Hasura's GraphQL Joins +- Schema merging and stitching (various implementations in many languages) +- GraphQL modules and other "extend type"-based approaches +- Federation (Apollo's v1 and v2, Mercurius, WunderGraph, Hot Chocolate, etc) +- Hasura's GraphQL Joins Though these are all separate solutions to similar problems, there are various concerns that most of them have to consider: -* Identifying the schemas to join -* Discovering/defining the relationships between the types/schemas -* Schema manipulation to avoid conflicts (e.g. renaming types/fields) -* Declaring which schemas "own" a particular type, and detecting conflicts -* Detecting breaking changes -* Actually fetching the relevant data, and combining it to fulfil the GraphQL request -* etc +- Identifying the schemas to join +- Discovering/defining the relationships between the types/schemas +- Schema manipulation to avoid conflicts (e.g. renaming types/fields) +- Resolving questions around type "ownership", redundancy and/or sharing; detecting conflicts +- Detecting breaking changes +- Actually fetching the relevant data, and combining it to fulfil the GraphQL request +- Managing composition metadata with respect to handling the above concerns +- etc It feels like it would be of benefit to the ecosystem at large if there were a shared specification that covers a few of these needs. From 1b75bfc82f0194381c4d9d810b17b56facece544 Mon Sep 17 00:00:00 2001 From: Benjie Gillam Date: Fri, 27 May 2022 11:34:10 +0100 Subject: [PATCH 6/7] Add interested parties that have attended a GraphQL WG recently --- rfcs/CompositeSchemas.md | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/rfcs/CompositeSchemas.md b/rfcs/CompositeSchemas.md index c6ee7ca7..dc512b5b 100644 --- a/rfcs/CompositeSchemas.md +++ b/rfcs/CompositeSchemas.md @@ -22,8 +22,16 @@ It feels like it would be of benefit to the ecosystem at large if there were a s If this is of interest to you, please enter your name, GitHub handle, and organization below: -| Name | GitHub | Organization | Location -| :----------------- | :-------------- | :----------------- | :----------------- -| Benjie Gillam | Benjie | Graphile | Chandler's Ford, UK -| Michael Staib | michaelstaib | ChilliCream Inc. | Zurich, CH -| Matteo Collina | mcollina | NearForm | Forlì, IT +| Name | GitHub | Organization | Location | +| :---------------- | :------------ | :--------------- | :------------------ | +| Benjie Gillam | @Benjie | Graphile | Chandler's Ford, UK | +| Yaacov Rydzinski | @yaacovCR | Individual | Neve Daniel, IL | +| Roman Ivantsov | @rivantsov | Microsoft | Redmond, WA, US | +| Tim Suchanek | @timsuchanek | GraphCDN | Berlin, DE | +| Saihajpreet Singh | @saihaj | The Guild | Ottawa, ON, CA | +| Matteo Collina | @mcollina | NearForm | Forlì, IT | +| Uri Goldshtein | @urigo | The Guild | Tel Aviv, IL | +| Marc-Andre Giroux | @xuorig | Netflix | Montreal, Canada | +| Praveen Durairaju | @praveenweb | Hasura | Bangalore, India | +| Hugh Willson | @hwillson | Apollo | Ottawa, ON, CA | +| Michael Staib | @michaelstaib | ChilliCream Inc. | Zurich, CH | From 1fd1aaeb0d466cb712bd7b35d74a54aa76eccfc2 Mon Sep 17 00:00:00 2001 From: Benjie Gillam Date: Sat, 28 May 2022 09:29:51 +0100 Subject: [PATCH 7/7] Add Nadel to examples --- rfcs/CompositeSchemas.md | 1 + 1 file changed, 1 insertion(+) diff --git a/rfcs/CompositeSchemas.md b/rfcs/CompositeSchemas.md index dc512b5b..bf204bd7 100644 --- a/rfcs/CompositeSchemas.md +++ b/rfcs/CompositeSchemas.md @@ -6,6 +6,7 @@ There's a _lot_ of different ways of combining multiple GraphQL schemas together - GraphQL modules and other "extend type"-based approaches - Federation (Apollo's v1 and v2, Mercurius, WunderGraph, Hot Chocolate, etc) - Hasura's GraphQL Joins +- Atlassian's Nadel Though these are all separate solutions to similar problems, there are various concerns that most of them have to consider: