Schema stitching
Schema stitching 2 GraphQL JavaScript/TypeScript Apollo graphql-tools Schema Stitching graphql-tools

GraphQLSchema
executable/non-executavle
api
server
local/remote
local
remote (introspection, link)
extend remote (delegate)
transform
merge
schema stitching
executable & executable
executable & non-executable
conflict
schema federation

graphql modules
graphql binding
gramps

Apollo namespace
schema federation
graphql-binding


GraphQLSchema
GraphQL.js GraphQL GraphQLSchema
const { makeExecutableSchema } = require('graphql-tools')
const { grpahql } = require('grpahql')
const typeDefs = `
type Query {
item(id: ID!): Item
}
type Item {
id: ID!
name: String
description: String
}`
const resolvers = {
Query: {
item: (root, args, context, info) => {
return ...
}
},
}
// GraphQLSchema
// SDL
const schema = makeExecutableSchema({
typeDef,
resolvers
})
//
const query = `
query {
item(id: "1") {
name
description
}
}`
graphql(schema, query)
.then(result => console.log(result))
makeRemoteExecutableSchema GraphQL API GraphQLSchema GraphQL API