随笔分类 -  GraphQL

摘要:Apollo Client is a comprehensive state management library for JavaScript that enables you to manage both local and remote data with GraphQL. Use it to 阅读全文
posted @ 2021-02-25 03:30 Zhentiw 阅读(75) 评论(0) 推荐(0) 编辑
摘要:In functions/graphql/index.js file: const { ApolloServer, gql } = require("apollo-server-lambda"); const typeDefs = gql` type Query { todos: [Todo]! } 阅读全文
posted @ 2021-02-25 03:24 Zhentiw 阅读(88) 评论(0) 推荐(0) 编辑
摘要:As you can see "Characters" take two params, page & filter. Here use two alias: allChars: characters fullNmae: name. Alias is also useful when you nee 阅读全文
posted @ 2020-09-15 23:32 Zhentiw 阅读(170) 评论(0) 推荐(0) 编辑
摘要:When using useQuery from Apollo React Hooks, the request will be sent automatically after the component has been mounted. This might not be the desire 阅读全文
posted @ 2019-08-29 19:25 Zhentiw 阅读(1510) 评论(0) 推荐(0) 编辑
摘要:Unions are used when we want a GraphQL field or list to handle multiple types of data. With a Union Type, we can define a field that could resolve com 阅读全文
posted @ 2019-08-20 18:06 Zhentiw 阅读(207) 评论(0) 推荐(0) 编辑
摘要:Interfaces are similar to Unions in that they provide a mechanism for dealing with different types of data. However, an interface is more suited for d 阅读全文
posted @ 2019-08-20 18:01 Zhentiw 阅读(225) 评论(0) 推荐(0) 编辑
摘要:Fragments are selection sets that can be used across multiple queries. They allow you to refactor redundant selection sets, and they are essential whe 阅读全文
posted @ 2019-08-20 17:42 Zhentiw 阅读(162) 评论(0) 推荐(0) 编辑
只有注册用户登录后才能阅读该文。
posted @ 2019-08-20 02:56 Zhentiw 阅读(3) 评论(0) 推荐(0) 编辑
摘要:query($category:PetCategory=CAT, $status:PetStatus=AVAILABLE) { #availablePets is the alias availablePets:totalPets(status: AVAILABLE), #checkoutPets 阅读全文
posted @ 2019-08-16 22:08 Zhentiw 阅读(208) 评论(0) 推荐(0) 编辑
只有注册用户登录后才能阅读该文。
posted @ 2019-08-15 03:23 Zhentiw 阅读(3) 评论(0) 推荐(0) 编辑
只有注册用户登录后才能阅读该文。
posted @ 2019-08-15 03:17 Zhentiw 阅读(2) 评论(0) 推荐(0) 编辑
摘要:Showing how to use 'uqrl' library to do GraphQL in React. 阅读全文
posted @ 2019-03-08 14:36 Zhentiw 阅读(363) 评论(0) 推荐(0) 编辑
摘要:With GraphQL, every field and nested object can have a set of arguments which can be used to request very specific data from a GraphQL API. In this le 阅读全文
posted @ 2019-01-12 23:14 Zhentiw 阅读(278) 评论(0) 推荐(0) 编辑
摘要:A GraphQL fragment encapsulates a collection of fields that can be included in queries. In this video, we'll look at how to create fragments on types 阅读全文
posted @ 2019-01-12 23:07 Zhentiw 阅读(219) 评论(0) 推荐(0) 编辑
摘要:Get started with apollo server with node.js: Install: index.js: 阅读全文
posted @ 2019-01-11 16:16 Zhentiw 阅读(157) 评论(0) 推荐(0) 编辑
摘要:To query a GraphQL API, all you need to do is send an HTTP request that includes the query operation in the body of the request. In this lesson, we wi 阅读全文
posted @ 2019-01-07 18:35 Zhentiw 阅读(432) 评论(0) 推荐(0) 编辑
摘要:In this lesson, you will learn how to query local and remote data in Apollo Link State in the same component. We'll set the @client decorator on the l 阅读全文
posted @ 2018-09-08 22:46 Zhentiw 阅读(211) 评论(0) 推荐(0) 编辑
摘要:In this lesson I refactor some code that utilizes the Mutation component to update client-side cache to use the new ApolloConsumer component baked int 阅读全文
posted @ 2018-05-13 01:46 Zhentiw 阅读(386) 评论(0) 推荐(0) 编辑
摘要:In this lesson I refactor a React component that utilizes a higher-order component for mutations to the new Mutation render prop component baked into 阅读全文
posted @ 2018-04-30 15:44 Zhentiw 阅读(267) 评论(0) 推荐(0) 编辑
摘要:Sometimes, you want to resues object type when doing mutation, you can use 'input' type to help: Doc 阅读全文
posted @ 2018-04-12 02:52 Zhentiw 阅读(172) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示