我希望组件从其父组件接收其初始数据,同时仍然能够自己对数据进行分页。
例如,考虑
<Parent> //Makes initial GraphQL call
<StaticChild/> //Uses initial data and never needs to rerender
<DynamicChild/> //Paginates the same query that the Parent made, will need to rerender for every new "page"
</Parent>
<
我目前正在使用用于阿波罗客户端的vue-apollo包和带有django的VueJs栈,以及用于我的GraphQl应用程序接口的石墨烯-python。 下面我用vue-apollo做了一个简单的设置: import Vue from 'vue'
import { ApolloClient } from 'apollo-client'
import { HttpLink } from 'apollo-link-http'
import { InMemoryCache } from 'apollo-cache-inmemory'
i
我正在使用Apollo客户端,Graphcool和React。我有一个工作的登录表单,但我需要的UI更新时,用户登录,我需要这发生在不同的组件。
看起来apollo-link-state就是这个问题的解决方案。我的下面的代码似乎可以工作,但我得到了这个错误:
writeToStore.js中的Missing field CurrentUserIsLoggedIn in {}
我的Apollo客户端设置:
import React from 'react';
import ReactDOM from 'react-dom';
// Apollo
import {
在响应本地阿波罗客户端时,当调用突变时如何传递附加的标头?
我的当事人来了:
import { HttpLink } from 'apollo-link-http';
import { ApolloClient } from 'apollo-client';
import { InMemoryCache } from 'apollo-cache-inmemory';
const makeApolloClient = (token) => {
// create an apollo link instance, a network