Programing v2.1: Introduction of GraphQL, Queries, Mutations and Variables [CRUD] [Beginner]
Автор: Untold Thruth
Загружено: 2021-07-08
Просмотров: 98
#graphql #mutation #queries
Demonstrating of creation simple Post model with:
graphql.monster schema for model Post - • Programing v2.1: Introduction of GraphQL, ...
-------------------------------------------------------------------
model Post {
text: String
color: String
}
Admin playground and do some action on Post model - • Programing v2.1: Introduction of GraphQL, ...
---------------------------------------------------------------------------------------
Mutations:
createPost - create one post • Programing v2.1: Introduction of GraphQL, ...
updatePost - update one post • Programing v2.1: Introduction of GraphQL, ...
removePost - remove all post • Programing v2.1: Introduction of GraphQL, ...
Queries:
Post - retrieve one post by id • Programing v2.1: Introduction of GraphQL, ...
allPost - retrieve all posts • Programing v2.1: Introduction of GraphQL, ...
allPost limit - retrieve all posts but limited to a number • Programing v2.1: Introduction of GraphQL, ...
allPost filter - retrieve all post what match a filter • Programing v2.1: Introduction of GraphQL, ...
allPost orderBy - retrieve all post but sorted by a field • Programing v2.1: Introduction of GraphQL, ...
Function with variables
CreatePost - create one post params from variables • Programing v2.1: Introduction of GraphQL, ...
------------------------------------------------------------
demo: https://demo.graphql.monster/
source code of demo: https://github.com/miuan/graphql-mons...
----------------------------------------------------------
npx create-react-app my-app --template gql-monster-typescript
official template for create react app:
https://github.com/miuan/cra-template...
Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: