包详细信息

netlify-onegraph-internal

anmonteiro80.1kMIT0.10.1

Internal tools for use by Netlify

自述文件

Netlify internal helpers for OneGraph

Install

npm install netlify-onegraph-internal

Example

import { OneGraphClient } from "netlify-onegraph-internal";

console.log(OneGraphClient);

Developing

  • While the multi-file branch in the CLI isn't ready:

  • Update the GraphQL schema with:

    $ npx get-graphql-schema "https://graph.netlify.com/graphql?app_id=NETLIFY_SITE_ID"
    
  • Add a new .graphql file under ./netlify/functions/netlifyGraph/operations
  • Don't forget to add a @netlify(id: SOME_UUID) directive to the operation
  • run cat ./netlify/functions/netlifyGraph/operations/* > operations.graphql` to bundle all the operations into a single file
  • run ntl graph:library