Repository navigation
Feature/apollo federation docs - #5791
michaelstaib merged 41 commits into
Conversation
Trying to make the content a little more organized by using more discrete sections for the topics.
|
Since this is a WIP, and I'm not sure if the maintainers are notified of draft PRs, I want to tag @rstaib @michaelstaib @PascalSenn for some visibility. Like I mentioned in the description, I'm definitely open to suggestions on content structure or additional sections or functionalities that are worth highlighting! Just lmk if you have any particular suggestions. |
|
Hey @willwolfram18 thank you for your help on this! |
Also added the term supergraph to the cSpell file that way the term matches Apollo Federation documentation
|
@willwolfram18 this looks great - thank you so much for chiming in! :) I haven't explored the Apollo Federation integration yet, so I can't comment on what would be good to document. |
Will do! I'm definitely onboard with having the doc pressure tested through application by another person! I am starting to wonder if it would be more helpful to structure this document as more of a "how to create a subgraph" docs, similar to Apollo Federation's docs: https://www.apollographql.com/docs/apollo-server/using-federation/apollo-subgraph-setup/ I've flipped back and forth on whether it's more helpful to treat the document as a "hey, Apollo docs will give you all the details and know how of an Apollo subgraph works and we'll just tell you how to do it in Hot Chocolate" OR take a more thorough approach of saying "okay, start with creating 2 web API projects. Add your packages, define your types" and make it more step-by-step. Any particular thoughts, one way or another? I'm starting to think that maybe a step-by-step is more helpful so that people know the specific steps they need to take and why |
|
Hmm, I would assume most people wishing to create an Apollo Federation Subgraph in Hot Chocolate have experience with Apollo Federation. So I don't think we need to be super thorough and explain all the concepts. |
…to feature/apollo-federation-docs
Making it clear to readers that the intent of this document is puerly focused on "how do I do this concept in Hot Chocolate?" The document is not designed to break down all of the nitty-gritty details of Apollo Federation overall.
Created the basic details and outline for creating an extended service type. Next sections to work on will be the field contributions
|
@tobias-tengler I think the docs are ready for a test drive when you're ready! I'm not familiar with the "contributing computed fields" portion of the API's functionality yet so I won't be able to fill that out but I'll make it a goal to work on that in a subsequent PR. Would love whatever feedback you have to help make this easier to digest and understand, whether it be wording, level of detail, or general organization. Just want to see this become more helpful for others in the future! Once the v12 doc is in a reasonable state, I'll copy the information over to the v13 so that we have a solid foundation to build out those docs with any changes since v12.6 👍 |
|
Thank you so much 🙏 I'll take it for a spin over the weekend! |
tobias-tengler
left a comment
There was a problem hiding this comment.
This looks pretty good :) All in all I had no real trouble setting up two simple subgraphs, after reading this and Apollo's documentation.
I highlighted places that need some clarifications in my opinion.
There are also some Markdown formatting issues, like missing spaces after headings. If you use VS Code, you can resolve them by simply formatting the document (I think). The numbered lists all start with 1. as well :D
| Hot Chocolate includes an implementation of the Apollo Federation v2 specification for creating Apollo Federated subgraphs. Through Apollo Federation, you can combine multiple GraphQL APIs into a single API for your consumers. | ||
|
|
||
| ## Example subgraphs | ||
| The documentation describes the syntax for creating an Apollo Federated subgraph using Hot Chocolate and relates the implementation specifics to its counterpart in the Apollo Federation docs. This document *will not* provide a thorough explanation of the Apollo Federation core concepts nor will it describe how you go about creating a supergraph to stitch together various subgraphs, as the Apollo Federation team already provides thorough documentation of those principles. |
There was a problem hiding this comment.
I think afterwards we could link to our Apollo Federation examples for folks that just want to look at a working setup: https://github.com/ChilliCream/graphql-platform/tree/main/src/HotChocolate/ApolloFederation/examples
There was a problem hiding this comment.
Love the suggestion! I think an additional contribution I'd like to make, if I can make the time, is setting up one or both of the solutions with a docker-compose.yaml file that would allow someone to easily spin up all of the subgraphs in one easy command. Pair that with the fact that Visual Studio has support for docker-compose.yaml and we can provide users with an easy "click once" style debugging session that can help them interact with the example and see the pieces working all together 👍
…to feature/apollo-federation-docs
Co-authored-by: Tobias Tengler <45513122+tobias-tengler@users.noreply.github.com>
Co-authored-by: Tobias Tengler <45513122+tobias-tengler@users.noreply.github.com>
Co-authored-by: Tobias Tengler <45513122+tobias-tengler@users.noreply.github.com>
Updated the GitHub workflow that runs CodeQL so that it ignores the *.md files that are used for the website and docs.
|
Hey @michaelstaib @tobias-tengler just checking in to see if this is ready to merge (aside from probably needing to merge latest changes from main into the working branch) |
can you merge this? Looks like @tobias-tengler approved |
|
I can't merge it. @michaelstaib needs to do it. |
|
/AzurePipelines run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
|
/AzurePipelines run |
|
Commenter does not have sufficient privileges for PR 5791 in repo ChilliCream/graphql-platform |
|
/AzurePipelines run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
|
Kudos, SonarCloud Quality Gate passed! |
|
👋 Is there anything I can do to help with these docs landing? |
|
@willwolfram18 I'm currently working on a PoC that uses Apollo's tutorial but replaces one of the subgraphs with a HC version. |
|
@tsinghammer my approval is there, but @michaelstaib needs to merge it - I can't. |
|
I will merge this version tonight. |
|
@tsinghammer I have merged it into main and you can do another PR and start on adding more documentation to it now. |
|
Kudos, SonarCloud Quality Gate passed! |
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [HotChocolate.Abstractions](https://chillicream.com/) ([source](https://github.com/ChilliCream/graphql-platform)) | `13.7.0` -> `13.8.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | | [HotChocolate.AspNetCore](https://chillicream.com/) ([source](https://github.com/ChilliCream/graphql-platform)) | `13.7.0` -> `13.8.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | | [HotChocolate.AspNetCore.Authorization](https://chillicream.com/) ([source](https://github.com/ChilliCream/graphql-platform)) | `13.7.0` -> `13.8.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | | [HotChocolate.Data](https://chillicream.com/) ([source](https://github.com/ChilliCream/graphql-platform)) | `13.7.0` -> `13.8.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | | [HotChocolate.Data.EntityFramework](https://chillicream.com/) ([source](https://github.com/ChilliCream/graphql-platform)) | `13.7.0` -> `13.8.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | | [HotChocolate.Types](https://chillicream.com/) ([source](https://github.com/ChilliCream/graphql-platform)) | `13.7.0` -> `13.8.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>ChilliCream/graphql-platform (HotChocolate.Abstractions)</summary> ### [`v13.8.0`](https://github.com/ChilliCream/graphql-platform/releases/tag/13.8.0) [Compare Source](https://github.com/ChilliCream/graphql-platform/compare/13.7.0...13.8.0) ##### What's Changed - Fixed issue with the fusion configuration rewriter. ([https://github.com/ChilliCream/graphql-platform/pull/6670](https://github.com/ChilliCream/graphql-platform/pull/6670)) - Adds example for failing error interface ([https://github.com/ChilliCream/graphql-platform/pull/6665](https://github.com/ChilliCream/graphql-platform/pull/6665)) - Set limit on serialized message size in Subscriptions.Postgres ([https://github.com/ChilliCream/graphql-platform/pull/6678](https://github.com/ChilliCream/graphql-platform/pull/6678)) - Fix JsonElement serialization for StrawberryShake - Reworked JSON scalar usage with StrawberryShake. ([https://github.com/ChilliCream/graphql-platform/pull/6683](https://github.com/ChilliCream/graphql-platform/pull/6683)) - Updated BananaCakePop Default Version ([https://github.com/ChilliCream/graphql-platform/pull/6687](https://github.com/ChilliCream/graphql-platform/pull/6687)) - Make postgres subscription provider compatible with npgsql 8 ([https://github.com/ChilliCream/graphql-platform/pull/6686](https://github.com/ChilliCream/graphql-platform/pull/6686)) - Handle JsonElement JsonValueKind.Null when deserializing ([https://github.com/ChilliCream/graphql-platform/pull/6481](https://github.com/ChilliCream/graphql-platform/pull/6481)) - Fixed Utf8JsonWriterHelper to not ignore null dictionary values ([https://github.com/ChilliCream/graphql-platform/pull/6689](https://github.com/ChilliCream/graphql-platform/pull/6689)) - Fixed the ghost files in Rider when using strawberyy shake ([https://github.com/ChilliCream/graphql-platform/pull/6693](https://github.com/ChilliCream/graphql-platform/pull/6693)) - Fixed dotnet version check filter non version output for Strawberry Shake ([https://github.com/ChilliCream/graphql-platform/pull/6699](https://github.com/ChilliCream/graphql-platform/pull/6699)) - Fixed argument naming conventions for mutation conventions. ([https://github.com/ChilliCream/graphql-platform/pull/6705](https://github.com/ChilliCream/graphql-platform/pull/6705)) - Fixed cache pollution for in/nin filter expressions ([https://github.com/ChilliCream/graphql-platform/pull/6711](https://github.com/ChilliCream/graphql-platform/pull/6711)) - Fixed large json read corruption ([https://github.com/ChilliCream/graphql-platform/pull/6713](https://github.com/ChilliCream/graphql-platform/pull/6713)) - Fixed typo in Banana Cake Pop docs ([https://github.com/ChilliCream/graphql-platform/pull/6715](https://github.com/ChilliCream/graphql-platform/pull/6715)) - Update open api schema snapshot to fix unit tests ([https://github.com/ChilliCream/graphql-platform/pull/6708](https://github.com/ChilliCream/graphql-platform/pull/6708)) - Fixed array writer reset ([https://github.com/ChilliCream/graphql-platform/pull/6719](https://github.com/ChilliCream/graphql-platform/pull/6719)) - \[maintenance] Empty type termination using semicolon. [https://github.com/ChilliCream/graphql-platform/pull/6725](https://github.com/ChilliCream/graphql-platform/pull/6725)5) - Added apollo federation docs ([https://github.com/ChilliCream/graphql-platform/pull/5791](https://github.com/ChilliCream/graphql-platform/pull/5791)) - Fixed example in docs ([https://github.com/ChilliCream/graphql-platform/pull/6733](https://github.com/ChilliCream/graphql-platform/pull/6733)) - StrawberryShake documentation fixes ([https://github.com/ChilliCream/graphql-platform/pull/6742](https://github.com/ChilliCream/graphql-platform/pull/6742)) - Adds more documentation for BCP ([https://github.com/ChilliCream/graphql-platform/pull/6709](https://github.com/ChilliCream/graphql-platform/pull/6709)) - Avoid writing BOM in StrawberryShake Tools ([https://github.com/ChilliCream/graphql-platform/pull/6751](https://github.com/ChilliCream/graphql-platform/pull/6751)) - Fixed transport layer byte-array handling. ([https://github.com/ChilliCream/graphql-platform/pull/6763](https://github.com/ChilliCream/graphql-platform/pull/6763)) - Fixed SSE message corruption ([https://github.com/ChilliCream/graphql-platform/pull/6642](https://github.com/ChilliCream/graphql-platform/pull/6642)) - Do not send omitted arguments with default values to subgraph ([https://github.com/ChilliCream/graphql-platform/pull/6767](https://github.com/ChilliCream/graphql-platform/pull/6767)) - Fixed mutation error dependency registration. ([https://github.com/ChilliCream/graphql-platform/pull/6674](https://github.com/ChilliCream/graphql-platform/pull/6674)) - Fixed issue with default values on mutations. ([https://github.com/ChilliCream/graphql-platform/pull/6776](https://github.com/ChilliCream/graphql-platform/pull/6776)) - Fixed CostAttribute multiplier path signature. ([https://github.com/ChilliCream/graphql-platform/pull/6777](https://github.com/ChilliCream/graphql-platform/pull/6777)) - Fixed issue that caused the tag directive to be ignored. ([https://github.com/ChilliCream/graphql-platform/pull/6746](https://github.com/ChilliCream/graphql-platform/pull/6746)) - Fixed broken postgres tests ([https://github.com/ChilliCream/graphql-platform/pull/6779](https://github.com/ChilliCream/graphql-platform/pull/6779)) - Fixed Keyed Services ([https://github.com/ChilliCream/graphql-platform/pull/6782](https://github.com/ChilliCream/graphql-platform/pull/6782)) - Fixed Tag Composition Tooling ([https://github.com/ChilliCream/graphql-platform/pull/6783](https://github.com/ChilliCream/graphql-platform/pull/6783)) - EF Core middleware must check for IAsyncEnumerable. ([https://github.com/ChilliCream/graphql-platform/pull/6784](https://github.com/ChilliCream/graphql-platform/pull/6784)) **Full Changelog**: ChilliCream/graphql-platform@13.7.0...13.8.0-preview.8 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "after 10pm every weekday,every weekend,before 5am every weekday" in timezone Europe/Berlin, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/orso-co/Orso.Arpa.Api). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMDMuMSIsInVwZGF0ZWRJblZlciI6IjM3LjEwMy4xIiwidGFyZ2V0QnJhbmNoIjoiZGV2ZWxvcCJ9--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>









Summary
Updated the Hot Chocolate documentation to describe the Apollo Federation library.
[ReferenceResolver]Context
My team has been implementing an Apollo Federated GraphQL API using Hot Chocolate. As a way to help both my team and other developers in the community, I wanted to get the Apollo Federation documentation built out to help future developers take advantage of these tools within the framework.
I'm open to suggestions on content structure, or additional elements that should be included in the documentation, as I'm filling out information mostly from my experiences with the library at this point and I'm sure I don't know the whole set of capabilities the library has to offer yet.