How to split a long GraphQL schema

前端 未结 3 1720
情深已故
情深已故 2021-02-08 07:32

I am trying to create a Schema, however is going to get too long and confusing, what are the best practices to split the different queries, mutations and inputs so I can just r

3条回答
  •  情歌与酒
    2021-02-08 08:18

    You could use Type definitions (SDL) merging of graphql-tools as well.

    This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.

    The doc introduces multiple ways to merge SDL.

    I made an example of modularizing-the-schema using apollo-server tech stack.

提交回复
热议问题