How to use where clause in Knex
Create refunds with Stripe
Load HTML with Cheerio
How to send POST request with Axios
Find intersection of array in Lodash
Powered by Official white Bloop logo with a period

Terms / Privacy / Search / Support

  • // The `client` variable refers to your `ApolloClient` instance.
    // It would be imported in your template,
    // or passed via props thanks to `withApollo` in React for example.
    
    Meteor.logout(function() {
      return client.resetStore(); // make all active queries re-run when the log-out process completed
    });
    Docs
  • import { ApolloClient, InMemoryCache } from '@apollo/client';
    
    const client = new ApolloClient({
      cache: new InMemoryCache({
        typePolicies: {
          Query: {
            fields: {
              book: {
                read(_, { args, toReference }) {
                  return toReference({
                    __typename: 'Book',
                    id: args.id,
                  });
                }
              }
            }
          }
        }
      })
    });
    Docs
  • import { makeVar } from '@apollo/client';
    
    const cartItemsVar = makeVar([]);
    Docs
  • import React from "react";
    import {
      ApolloClient,
      createHttpLink,
      InMemoryCache,
      ApolloProvider
    } from "@apollo/client";
    
    import Character from "./Character";
    
    export const link = createHttpLink({
      uri: "https://mpjk0plp9.lp.gql.zone/graphql"
    });
    
    export const client = new ApolloClient({
      cache: new InMemoryCache(),
      link,
    });
    
    export default () =>
      <ApolloProvider client={client}>
        // $ExpectError property `episode`. Property not found in. See: src/Character.js:43
        <Character />
      </ApolloProvider>;
    Docs
  • const client = new ApolloClient({
      cache: new InMemoryCache(),
      uri: "http://localhost:4000/graphql"
    });
    
    ReactDOM.render(
      <ApolloProvider client={client}>
        <MyRootComponent />
      </ApolloProvider>,
      document.getElementById('root'),
    );
    Docs
  • Powered by Official black Bloop logo with a period
    download the IDE extension

    View other examples