How to use @grafoo/core - 7 common examples

To help you get started, we’ve selected a few @grafoo/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github grafoojs / grafoo / packages / bindings / __tests__ / index.ts View on Github external
beforeEach(() => {
    jest.resetAllMocks();
    const transport = createTransport("https://some.graphql.api/");
    client = createClient(transport, { idFields: ["id"] });
  });
github grafoojs / grafoo / packages / react / __tests__ / index.tsx View on Github external
beforeEach(() => {
    jest.resetAllMocks();
    const transport = createTrasport("https://some.graphql.api/");
    client = createClient(transport, { idFields: ["id"] });
  });
github grafoojs / grafoo / packages / react / __tests__ / hooks.tsx View on Github external
beforeEach(() => {
    jest.resetAllMocks();
    client = createClient(createTrasport("https://some.graphql.api/"), { idFields: ["id"] });
  });
github grafoojs / grafoo / packages / preact / __tests__ / index.tsx View on Github external
beforeEach(() => {
    jest.resetAllMocks();

    const transport = createTransport("https://some.graphql.api/");
    client = createClient(transport, { idFields: ["id"] });
  });
github grafoojs / grafoo / examples / react / src / client.js View on Github external
import createGrafooConsumer from "@grafoo/react";
import createClient from "@grafoo/core";

const client = createClient("https://api.graph.cool/simple/v1/cj28ccc28umr50115gjodwzix");

if (process.env.NODE_ENV !== "production") window.client = client;

const Consumer = createGrafooConsumer(client);

export default Consumer;
github grafoojs / grafoo / examples / react / src / index.js View on Github external
import "./globalstyles";

import createClient from "@grafoo/core";
import bootstrap from "./bootstrap";

const client = createClient("https://api.graph.cool/simple/v1/cj28ccc28umr50115gjodwzix");

if (process.env.NODE_ENV !== "production") window.client = client;

bootstrap(client);

if (module.hot) {
  module.hot.accept(["./bootstrap"], () => {
    const { default: nextBootstrap } = require("./bootstrap");

    nextBootstrap(client);
  });
}
github grafoojs / grafoo / examples / preact / src / client.js View on Github external
import createClient from "@grafoo/core";

const client = createClient("https://api.graph.cool/simple/v1/cj28ccc28umr50115gjodwzix");

if (process.env.NODE_ENV !== "production") window.client = client;

export default client;

@grafoo/core

grafoo client core

MIT
Latest version published 3 years ago

Package Health Score

45 / 100
Full package analysis

Popular @grafoo/core functions