Socket
Socket
Sign inDemoInstall

@edgeandnode/graphiql-playground

Package Overview
Dependencies
3
Maintainers
19
Versions
34
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @edgeandnode/graphiql-playground

<sub> If you're looking for the GraphiQL repository, go to https://github.com/graphql/graphiql. </sub>


Version published
Maintainers
19
Created

Readme

Source
If you're looking for the GraphiQL repository, go to https://github.com/graphql/graphiql.

The Graph GraphiQL Playground

Configuration, styling and extensions for the GraphiQL Playground component embedded in The Graph Protocol applications

image

Usage

Install @edgeandnode/graphiql-playground with your favorite package manager.

npm i @edgeandnode/graphiql-playground

Then, import GraphProtocolGraphiQL and use it in your React components.

const Playground = () => {
  return (
    <GraphProtocolGraphiQL
      fetcher={{
        url: 'https://api.thegraph.com/subgraphs/name/graphprotocol/graph-network-mainnet-staging',
      }}
      queries={savedQueries}
      currentQueryId={currentQueryId}
      header={
        <GraphProtocolGraphiQL.SavedQueriesToolbar
          isMobile={false}
          isOwner={true}
          onSelectQuery={onSelectQuery}
          onSaveAsNewQuery={onSaveAsNewQuery}
          onDeleteQuery={onDeleteQuery}
          onSetQueryAsDefault={onSetQueryAsDefault}
          onUpdateQuery={onUpdateQuery}
        />
      }
    />
  )
}

You can find example implementation in /demo/.index.tsx

Contributing

  • This library exports one React component named GraphProtocolGraphiQL, built using @graphiql/react, @graphiql/plugin-explorer and @graphiql/toolkit.
  • It's meant to be used instead of graphiql package in The Graph Protocol applications.
  • Install the dependencies and run scripts from package.json using pnpm.

FAQs

Last updated on 23 May 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc