{"repo":"n1ru4l/graphql-public-schema-filter","free":true,"listed":false,"github":"https://github.com/n1ru4l/graphql-public-schema-filter","clone":"git clone https://github.com/n1ru4l/graphql-public-schema-filter.git","description":"Filter your GraphQL graph into a subgraph. Code-first & SDL-first!","language":"TypeScript","stars":55,"topics":["access-control","api","graphql","graphql-tools","the-guild"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"@n1ru4l/graphql-public-schema-filter This library allows filtering an existing GraphQL schema down into a subset of the original schema. It supports both the code first development flow of building GraphQL schemas (via GraphQL extension fields) and the SDL first development flow (via schema directives). The implementation is smart and warns the user if the processed annotations would result in an invalid schema such as: - Object Type without fields - Field whose type is not part of the schema If such a scenario is encountered the implementation will propagate and hide all fields/types that use types that are not marked as public or that would be invalid. Why would you need this? As I have been building GraphQL APIs I often had the need to have both a private and public API. The private API is used for in-house products. Breaking changes can and will occur. It also includes types and fields specific to in-house application built around the API. The public API, however, is used by individuals not part of our organization. We cannot simply roll out breaking changes on the GraphQL API for those. Furthermore, they should only have access to a subset of the whole GraphQL graph. By generating a subgraph out of the internal graph we can hide stuff, without having to maintain and build two GraphQL schema. Install instructions This library requires graphql as a peer dependency and has a runtime dependency on @graphql-tools/utils . Usage Instructions This library is designed to be inclu","default_branch":null,"files":null,"tree":[],"storefront":"/r/n1ru4l","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/n1ru4l/graphql-public-schema-filter/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}