@northernv/vgql

CabinKey Schema

Stats

StarsIssuesVersionUpdatedCreatedSize
@northernv/vgql
3.0.9a year ago3 years agoMinified + gzip package size for @northernv/vgql in KB

Readme

Schema for ...

.gitlab-ci.yml is located in https://gitlab.com/northernv/gitlab-ci-templates

Schema

  • Queries and Mutations are in queries.gql
  • Types are in types.gql

Templates

The client query/mutation/fragments are held in /t. These are used directly by the server when creating contract (integration) tests for the various GQL methods.

Client GQL files

Run the npm run build file to generate the frontend GQL files.

/static

Files ready to be consumed by React/Vue when using Apollo GraphQL loader

Usage

In Webpack

loaders: [
  {
    test: /\.(graphql|gql)$/,
    exclude: /node_modules/,
    loader: 'graphql-tag/loader'
  }
]

In the file

import Unit from '@northernv/vgql/static/unit.gql'

const { data, errors } = await this.$apollo.query({
  query: Unit,
  variables: {
    input: { ... },
  }
})

/json

Files ready to be consumed by Apollo, no need for graphql-tag

Usage

import Unit from '@northernv/vgql/json/unit'

const { data, errors } = await this.$apollo.query({
  query: Unit,
  variables: {
    input: { ... },
  }
})

/gql

Files used with graphql-tag

Usage

import Unit from '@northernv/vgql/gql/unit'
import gql from 'graphql-tag'

const { data, errors } = await this.$apollo.query({
  query: gql`Unit`,
  variables: {
    input: { ... },
  }
})

Directives

  • @timestamp: Adds createdAt, updatedAt, deletedAt properties to types timestamp-directive.js

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.