@relay-graphql-js/graphql-config
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

@relay-graphql-js/graphql-config

npm build

This provides a simple configuration to may relay config to graphql-config.

Features:

  • Reads user configuration from [relay-config], if the project is setup with it.
  • Provides definitions for all Relay directives for validation and auto-completion purposes.
  • Provides validation of @argumentDefinitions and @arguments directives.
  • uses your locally installed graphql version!
  • multiple environments are not supported yet but are coming soon!

Changelog

Install

# using npm
npm install --save-dev @relay-graphql-js/graphql-config

# using yarn
yarn add --dev @relay-graphql-js/graphql-config

(assuming graphql-config is installed already, which is used only for types)

Usage

In your graphql.config.ts file:

import { generateConfig } from "@relay-graphql-js/graphql-config"
const config = generateConfig();

export default config

Or, in your graphql.config.js file:

const { config } = require("@relay-graphql-js/graphql-config").generateConfig()
module.exports = config

Why you might want to use this

Simply for tooling interoperability, if nothing else.

Limitations

This does not support relay environments => graphql-config projects, yet. Open a PR if you want it to!

Package Sidebar

Install

npm i @relay-graphql-js/graphql-config

Weekly Downloads

2

Version

0.1.0

License

MIT

Unpacked Size

438 kB

Total Files

12

Last publish

Collaborators

  • acao
  • alloy