Skip to content

Commit b275fbe

Browse files
committed
Initial commit
0 parents  commit b275fbe

File tree

9 files changed

+1079
-0
lines changed

9 files changed

+1079
-0
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
coverage/*

.eslintrc

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"rules": {
3+
"indent": ["error", 4, { "MemberExpression": 1 }],
4+
"quotes": [ "error", "single", {"allowTemplateLiterals": true}],
5+
"linebreak-style": ["error", "unix"],
6+
"semi": ["error", "always"],
7+
"curly": ["error"],
8+
"eqeqeq": ["error"],
9+
"brace-style": ["error", "1tbs"],
10+
"no-plusplus": ["error"],
11+
"max-depth": ["error", 4],
12+
"camelcase": ["error", {"properties": "never"}],
13+
"comma-spacing": ["error", {"before": false, "after": true}],
14+
"key-spacing": ["error", {"beforeColon": false, "afterColon": true, "mode": "minimum"}],
15+
"no-array-constructor": ["error"],
16+
"no-mixed-spaces-and-tabs": ["error", "smart-tabs"],
17+
"no-multiple-empty-lines": ["error", {"max": 2}],
18+
"no-spaced-func": ["error"],
19+
"no-trailing-spaces": ["error"],
20+
"quote-props": ["error", "consistent-as-needed"],
21+
"semi-spacing": ["error", {"before": false, "after": true}],
22+
"keyword-spacing": ["error"],
23+
"space-before-blocks": ["error"],
24+
"space-infix-ops": ["error"],
25+
"spaced-comment": ["error", "always"],
26+
"no-loop-func": ["error"],
27+
"no-magic-numbers": ["error", { "ignore": [0, 1, 2] }],
28+
"no-redeclare": ["error"],
29+
"no-unused-expressions": ["error"],
30+
"yoda": ["error"],
31+
"no-undef": ["error"],
32+
"no-irregular-whitespace": ["error"],
33+
"space-before-function-paren": ["error", "always"],
34+
"no-constant-condition": ["error"],
35+
"no-unused-vars": ["error", { "argsIgnorePattern": "^_" }],
36+
"padded-blocks": ["error", "always"]
37+
},
38+
"env": {
39+
"node": true,
40+
"es6": true
41+
},
42+
"parserOptions": {
43+
"sourceType": "module"
44+
},
45+
"extends": ["eslint:recommended"]
46+
}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
2+
scope=adgorithmics

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# graphql-errors
2+
Response erorr codes for graphql.

index.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// DB Flags
2+
exports.OBJECT_DUPLICATE = 'OBJECT_DUPLICATE';
3+
exports.OBJECT_NOT_FOUND = 'OBJECT_NOT_FOUND';
4+
5+
// Token Flags
6+
exports.TOKEN_EXPIRED = 'TOKEN_EXPIRED';
7+
exports.TOKEN_MALFORMED = 'TOKEN_MALFORMED';
8+
9+
// Permissions Flags
10+
exports.ACCESS_DENIED = 'ACCESS_DENIED';
11+
exports.UNAUTHORIZED = 'UNAUTHORIZED';
12+
13+
// Query Flags
14+
exports.QUERY_DEPTH_EXCEEDED = 'QUERY_DEPTH_EXCEEDED';
15+
exports.QUERY_COMPLEXITY_EXCEEDED = 'QUERY_COMPLEXITY_EXCEEDED';
16+
exports.QUERY_BREADTH_EXCEEDED = 'QUERY_BREADTH_EXCEEDED';
17+
18+
// Mystery Flags
19+
exports.UNKNOWN_ERROR = 'UKNOWN_ERROR';

0 commit comments

Comments
 (0)