我试图嘲弄服务作为文档例如http://dev.apollodata.com/tools/graphql-tools/mocking.html#Default-mock-example 我出口我的架构与标准内省查询,建立一个模式对象,并使用该当试图运行文档中提到的查询时。 import * as introspectionResult from "../../graphql/schema.json
GitHub的新GraphQL API需要使用令牌作为先前版本进行验证。那么,我们如何在Apollo-Client里添加一个'Header'信息到HttpLink? const client = new ApolloClient({
link: new HttpLink({ uri: 'https://api.github.com/graphql' }),
cache: new
我可以使混合方法工作,但我想使用完整的websocket传输,其中每个graphql操作都通过套接字完成。我的确和他们的documentation一样。 import { SubscriptionClient } from 'subscriptions-transport-ws'
import ApolloClient from 'apollo-client'
import gql from
我有以下apollo-graphql客户端代码,其中我每30秒触发一次graphql查询并获取数据。 import React, { Component } from 'react';
import { gql, graphql } from 'react-apollo';
import _ from 'underscore';
class Test extends Component {