[笔记] A Beginner’s Guide to GraphQL - 2019-05-07 00:00:00

links 原文: https://medium.freecodecamp.org/a-beginners-guide-to-graphql-86f849ce1bec A minimalistic zero-config GraphQL server. https://github.com/glennreyes/graphpack GraphQL Playground 调试工具介绍 https://www.prisma.io/blog/introducing-graphql-playground-f1e0a018f05d https://github.com/prisma/graphql-playground 知识点 schema types Queries Mutations Subscriptions schema Schema Definition Language (SDL) type Query { hello: String } Types 比如 Posts, Users, Likes, Groups 类型有 fields,比如 User 类型有 username email age type User { id: ID! name: String! email: String! age: Int } ! 表示这个field是 non-nullable 表示不可以为空 User类型可以为空的只有age queries mutations subscriptions Queries GraphQL如何知道从哪获取数据呢?