@ts-gql/schema
Advanced tools
Comparing version 0.7.0 to 0.7.1
# @ts-gql/schema | ||
## 0.7.1 | ||
### Patch Changes | ||
- [`45e1a24`](https://github.com/Thinkmill/ts-gql/commit/45e1a24511b810cd492a363c4ca85371944fb49e) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Added checks to types.field and types.arg which throw if a type isn't passed so that it's easier to see why a type wasn't passed rather than getting an error when mapping the fields to graphql-js arguments | ||
## 0.7.0 | ||
@@ -4,0 +10,0 @@ |
@@ -29,2 +29,6 @@ 'use strict'; | ||
function arg(arg) { | ||
if (!arg.type) { | ||
throw new Error("A type must be passed to types.arg()"); | ||
} | ||
return arg; | ||
@@ -104,2 +108,6 @@ } | ||
return function field(field) { | ||
if (!field.type) { | ||
throw new Error("A type must be passed to types.field()"); | ||
} | ||
return field; | ||
@@ -106,0 +114,0 @@ }; |
@@ -29,2 +29,6 @@ 'use strict'; | ||
function arg(arg) { | ||
if (!arg.type) { | ||
throw new Error("A type must be passed to types.arg()"); | ||
} | ||
return arg; | ||
@@ -104,2 +108,6 @@ } | ||
return function field(field) { | ||
if (!field.type) { | ||
throw new Error("A type must be passed to types.field()"); | ||
} | ||
return field; | ||
@@ -106,0 +114,0 @@ }; |
@@ -25,2 +25,6 @@ import { GraphQLEnumType, GraphQLInputObjectType, GraphQLList, GraphQLNonNull, GraphQLObjectType, GraphQLUnionType, GraphQLInterfaceType } from 'graphql/type/definition'; | ||
function arg(arg) { | ||
if (!arg.type) { | ||
throw new Error("A type must be passed to types.arg()"); | ||
} | ||
return arg; | ||
@@ -100,2 +104,6 @@ } | ||
return function field(field) { | ||
if (!field.type) { | ||
throw new Error("A type must be passed to types.field()"); | ||
} | ||
return field; | ||
@@ -102,0 +110,0 @@ }; |
{ | ||
"name": "@ts-gql/schema", | ||
"version": "0.7.0", | ||
"version": "0.7.1", | ||
"main": "dist/schema.cjs.js", | ||
@@ -5,0 +5,0 @@ "module": "dist/schema.esm.js", |
42011
977