graphql-typed
Advanced tools
Comparing version 0.6.1 to 0.7.0
@@ -1,18 +0,1 @@ | ||
import { DocumentNode as BaseDocumentNode, Source, ParseOptions } from 'graphql'; | ||
export interface GraphQLOperation<Data = {}, Variables = {}, DeepPartial = {}> { | ||
readonly __typeData?: Data; | ||
readonly __typeVariables?: Variables; | ||
readonly __typeDeepPartial?: DeepPartial; | ||
} | ||
export interface DocumentNode<Data = {}, Variables = {}, DeepPartial = {}> extends BaseDocumentNode, GraphQLOperation<Data, Variables, DeepPartial> { | ||
readonly id: string; | ||
} | ||
export interface SimpleDocument<Data = {}, Variables = {}, DeepPartial = {}> extends GraphQLOperation<Data, Variables, DeepPartial> { | ||
readonly id: string; | ||
readonly name?: string; | ||
readonly source: string; | ||
} | ||
export declare type GraphQLData<T> = T extends GraphQLOperation<infer Data, any, any> ? Data : never; | ||
export declare type GraphQLVariables<T> = T extends GraphQLOperation<any, infer Variables, any> ? Variables : never; | ||
export declare type GraphQLDeepPartial<T> = T extends GraphQLOperation<any, any, infer DeepPartial> ? DeepPartial : never; | ||
export declare const parse: <Data = {}, Variables = {}, DeepPartial = {}>(source: string | Source, options?: ParseOptions) => DocumentNode<Data, Variables, DeepPartial>; | ||
export * from "./build/ts/index"; |
@@ -1,4 +0,1 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const graphql_1 = require("graphql"); | ||
exports.parse = graphql_1.parse; | ||
module.exports = require("./build/node/index.js"); |
{ | ||
"name": "graphql-typed", | ||
"version": "0.6.1", | ||
"version": "0.7.0", | ||
"license": "MIT", | ||
"description": "A more strongly typed version of GraphQL's DocumentNode.", | ||
"main": "index.js", | ||
"license": "MIT", | ||
"types": "index.d.ts", | ||
"scripts": { | ||
"build": "tsc --p tsconfig.json" | ||
}, | ||
"sideEffects": false, | ||
"publishConfig": { | ||
@@ -14,15 +19,31 @@ "access": "public", | ||
"type": "git", | ||
"url": "git+https://github.com/Shopify/graphql-tools-web.git" | ||
"url": "git+https://github.com/Shopify/quilt.git", | ||
"directory": "packages/graphql-typed" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/shopify/graphql-tools-web/issues" | ||
"url": "https://github.com/Shopify/quilt/issues" | ||
}, | ||
"homepage": "https://github.com/shopify/graphql-tools-web/blob/main/packages/graphql-typed", | ||
"scripts": { | ||
"build": "tsc", | ||
"prepublishOnly": "yarn build" | ||
"homepage": "https://github.com/Shopify/quilt/blob/main/packages/graphql-typed/README.md", | ||
"peerDependencies": { | ||
"graphql": ">=14.5.0 <15.0.0", | ||
"tslib": "^1.14.1" | ||
}, | ||
"peerDependencies": { | ||
"graphql": ">=14.5.0 <15.0.0" | ||
"files": [ | ||
"build/*", | ||
"index.js", | ||
"index.d.ts", | ||
"index.esnext", | ||
"index.mjs", | ||
"!tsconfig.tsbuildinfo" | ||
], | ||
"module": "index.mjs", | ||
"esnext": "index.esnext", | ||
"exports": { | ||
"./": "./", | ||
".": { | ||
"import": "./index.mjs", | ||
"require": "./index.js", | ||
"esnext": "./index.esnext" | ||
} | ||
} | ||
} |
# `graphql-typed` | ||
> A more strongly typed version of GraphQL's DocumentNode. | ||
[![Build Status](https://github.com/Shopify/quilt/workflows/Node-CI/badge.svg?branch=main)](https://github.com/Shopify/quilt/actions?query=workflow%3ANode-CI) | ||
[![Build Status](https://github.com/Shopify/quilt/workflows/Ruby-CI/badge.svg?branch=main)](https://github.com/Shopify/quilt/actions?query=workflow%3ARuby-CI) | ||
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE.md) [![npm version](https://badge.fury.io/js/graphql-typed.svg)](https://badge.fury.io/js/graphql-typed.svg) {{#if usedInBrowser}} [![npm bundle size (minified + gzip)](https://img.shields.io/bundlephobia/minzip/graphql-typed.svg)](https://img.shields.io/bundlephobia/minzip/graphql-typed.svg) {{/if}} | ||
A more strongly typed version of GraphQL's DocumentNode. | ||
## Installation | ||
```bash | ||
$ yarn add graphql-typed | ||
``` | ||
npm install graphql-typed --save | ||
``` | ||
or, with Yarn: | ||
``` | ||
yarn add graphql-typed | ||
``` | ||
## Usage | ||
You probably don’t need to use this package explicitly. It is used internally by `graphql-typescript-definitions` and `graphql-fixtures` in order to include typing information about an operation in its `DocumentNode`. This allows for better type feedback when using `createFiller` in `graphql-fixtures`. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
6107
14
38
1
2
18