🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@codaline-io/create-apollo-error

Package Overview
Dependencies
Maintainers
2
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@codaline-io/create-apollo-error - npm Package Compare versions

Comparing version

to
0.1.0

4

lib/index.d.ts

@@ -1,2 +0,2 @@

import { GraphQLError } from 'graphql';
export declare const createApolloError: (message: string, code?: string | null) => GraphQLError;
import { GraphQLError, GraphQLErrorOptions } from 'graphql';
export declare const createApolloError: (message: string, code?: string | null, type?: string | null, options?: GraphQLErrorOptions) => GraphQLError;

@@ -1,2 +0,2 @@

var r=require("graphql");exports.createApolloError=function(e,o){return new r.GraphQLError(e,{extensions:{code:o}})};
var r=require("graphql");function e(){return e=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(r[t]=n[t])}return r},e.apply(this,arguments)}exports.createApolloError=function(n,t,o,a){return void 0===a&&(a={}),new r.GraphQLError(n,e({},a,{extensions:e({code:t,type:o},a.extensions||{})}))};
//# sourceMappingURL=index.js.map

@@ -1,2 +0,2 @@

import{GraphQLError as r}from"graphql";var e=function(e,n){return new r(e,{extensions:{code:n}})};export{e as createApolloError};
import{GraphQLError as n}from"graphql";function r(){return r=Object.assign?Object.assign.bind():function(n){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e])}return n},r.apply(this,arguments)}var t=function(t,e,o,i){return void 0===i&&(i={}),new n(t,r({},i,{extensions:r({code:e,type:o},i.extensions||{})}))};export{t as createApolloError};
//# sourceMappingURL=index.module.js.map

@@ -1,2 +0,2 @@

!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports,require("graphql")):"function"==typeof define&&define.amd?define(["exports","graphql"],o):o((e||self).createApolloError={},e.graphql)}(this,function(e,o){e.createApolloError=function(e,r){return new o.GraphQLError(e,{extensions:{code:r}})}});
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("graphql")):"function"==typeof define&&define.amd?define(["exports","graphql"],r):r((e||self).createApolloError={},e.graphql)}(this,function(e,r){function n(){return n=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},n.apply(this,arguments)}e.createApolloError=function(e,o,t,i){return void 0===i&&(i={}),new r.GraphQLError(e,n({},i,{extensions:n({code:o,type:t},i.extensions||{})}))}});
//# sourceMappingURL=index.umd.js.map
{
"name": "@codaline-io/create-apollo-error",
"version": "0.0.1",
"version": "0.1.0",
"scripts": {

@@ -5,0 +5,0 @@ "build": "rm -rf ./lib && microbundle --ts -i ./index.ts"

@@ -9,3 +9,7 @@ # create-apollo-error

throw createApolloError(message, optionalCode)
```
throw createApolloError(message, optionalErrorCode, optionalErrorType, optionalGraphQLErrorOptions)
```
- optionalErrorCode?: string | null -> graphqlError.extensions.code
- optionalErrorType?: string | null -> graphqlError.extensions.type
- optionalGraphQLErrorOptions?: GraphQLErrorOptions, e.g. setting original error and so on

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet