Skip to content

Commit fd6ee07

Browse files
committed
Initial commit.
0 parents  commit fd6ee07

32 files changed

+4149
-0
lines changed

.eslintrc

Lines changed: 259 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,259 @@
1+
{
2+
"parser": "babel-eslint",
3+
"arrowFunctions": true,
4+
"blockBindings": true,
5+
"classes": true,
6+
"defaultParams": true,
7+
"destructuring": true,
8+
"forOf": true,
9+
"generators": true,
10+
"modules": true,
11+
"objectLiteralComputedProperties": true,
12+
"objectLiteralShorthandMethods": true,
13+
"objectLiteralShorthandProperties": true,
14+
"spread": true,
15+
"templateStrings": true,
16+
"env": {
17+
"node": true,
18+
"es6": true
19+
},
20+
"rules": {
21+
"comma-dangle": 0,
22+
"no-cond-assign": 2,
23+
"no-console": 0,
24+
"no-constant-condition": 2,
25+
"no-control-regex": 0,
26+
"no-debugger": 0,
27+
"no-dupe-args": 2,
28+
"no-dupe-keys": 2,
29+
"no-duplicate-case": 2,
30+
"no-empty": 2,
31+
"no-empty-class": 2,
32+
"no-ex-assign": 2,
33+
"no-extra-boolean-cast": 2,
34+
"no-extra-parens": 0,
35+
"no-extra-semi": 2,
36+
"no-func-assign": 2,
37+
"no-inner-declarations": [
38+
2,
39+
"functions"
40+
],
41+
"no-invalid-regexp": 2,
42+
"no-irregular-whitespace": 2,
43+
"no-negated-in-lhs": 2,
44+
"no-obj-calls": 2,
45+
"no-regex-spaces": 2,
46+
"no-reserved-keys": 0,
47+
"no-sparse-arrays": 2,
48+
"no-unreachable": 2,
49+
"use-isnan": 2,
50+
"valid-jsdoc": 0,
51+
"valid-typeof": 2,
52+
"block-scoped-var": 0,
53+
"complexity": 0,
54+
"consistent-return": 0,
55+
"curly": [
56+
2,
57+
"all"
58+
],
59+
"default-case": 0,
60+
"dot-notation": 0,
61+
"eqeqeq": 2,
62+
"guard-for-in": 2,
63+
"no-alert": 2,
64+
"no-caller": 2,
65+
"no-div-regex": 2,
66+
"no-empty-label": 2,
67+
"no-eq-null": 0,
68+
"no-eval": 2,
69+
"no-extend-native": 2,
70+
"no-extra-bind": 2,
71+
"no-fallthrough": 2,
72+
"no-floating-decimal": 2,
73+
"no-implied-eval": 2,
74+
"no-iterator": 2,
75+
"no-labels": 0,
76+
"no-lone-blocks": 0,
77+
"no-loop-func": 0,
78+
"no-multi-spaces": 2,
79+
"no-multi-str": 2,
80+
"no-native-reassign": 0,
81+
"no-new": 2,
82+
"no-new-func": 0,
83+
"no-new-wrappers": 2,
84+
"no-octal": 2,
85+
"no-octal-escape": 2,
86+
"no-param-reassign": 2,
87+
"no-process-env": 0,
88+
"no-proto": 2,
89+
"no-redeclare": 2,
90+
"no-return-assign": 2,
91+
"no-script-url": 2,
92+
"no-self-compare": 0,
93+
"no-sequences": 2,
94+
"no-throw-literal": 2,
95+
"no-unused-expressions": 2,
96+
"no-void": 2,
97+
"no-warning-comments": 0,
98+
"no-with": 2,
99+
"radix": 2,
100+
"vars-on-top": 0,
101+
"wrap-iife": 2,
102+
"yoda": [
103+
2,
104+
"never",
105+
{
106+
"exceptRange": true
107+
}
108+
],
109+
"strict": 0,
110+
"no-catch-shadow": 2,
111+
"no-delete-var": 2,
112+
"no-label-var": 2,
113+
"no-shadow": 2,
114+
"no-shadow-restricted-names": 2,
115+
"no-undef": 2,
116+
"no-undef-init": 2,
117+
"no-undefined": 0,
118+
"no-unused-vars": [
119+
2,
120+
{
121+
"vars": "all",
122+
"args": "after-used"
123+
}
124+
],
125+
"no-use-before-define": 0,
126+
"handle-callback-err": [
127+
2,
128+
"error"
129+
],
130+
"no-mixed-requires": [
131+
2,
132+
true
133+
],
134+
"no-new-require": 2,
135+
"no-path-concat": 2,
136+
"no-process-exit": 0,
137+
"no-restricted-modules": 0,
138+
"no-sync": 2,
139+
"indent": [
140+
2,
141+
2,
142+
{
143+
"indentSwitchCase": true
144+
}
145+
],
146+
"brace-style": [
147+
2,
148+
"1tbs",
149+
{
150+
"allowSingleLine": true
151+
}
152+
],
153+
"camelcase": [
154+
2,
155+
{
156+
"properties": "always"
157+
}
158+
],
159+
"comma-spacing": 0,
160+
"comma-style": [
161+
2,
162+
"last"
163+
],
164+
"consistent-this": 0,
165+
"eol-last": 2,
166+
"func-names": 0,
167+
"func-style": 0,
168+
"key-spacing": [
169+
2,
170+
{
171+
"beforeColon": false,
172+
"afterColon": true
173+
}
174+
],
175+
"max-nested-callbacks": 0,
176+
"new-cap": 0,
177+
"new-parens": 2,
178+
"newline-after-var": 0,
179+
"no-array-constructor": 2,
180+
"no-inline-comments": 0,
181+
"no-lonely-if": 2,
182+
"no-mixed-spaces-and-tabs": 2,
183+
"no-multiple-empty-lines": 0,
184+
"no-nested-ternary": 0,
185+
"no-new-object": 2,
186+
"no-spaced-func": 2,
187+
"no-ternary": 0,
188+
"no-trailing-spaces": 2,
189+
"no-underscore-dangle": 0,
190+
"no-wrap-func": 2,
191+
"one-var": [
192+
2,
193+
"never"
194+
],
195+
"operator-assignment": [
196+
2,
197+
"always"
198+
],
199+
"padded-blocks": 0,
200+
"quote-props": [
201+
2,
202+
"as-needed"
203+
],
204+
"quotes": [
205+
2,
206+
"single"
207+
],
208+
"semi": [
209+
2,
210+
"always"
211+
],
212+
"semi-spacing": [
213+
2,
214+
{
215+
"before": false,
216+
"after": true
217+
}
218+
],
219+
"sort-vars": 0,
220+
"space-after-keywords": [
221+
2,
222+
"always"
223+
],
224+
"space-before-blocks": [
225+
2,
226+
"always"
227+
],
228+
"space-before-function-paren": [
229+
2,
230+
{
231+
"anonymous": "always",
232+
"named": "never"
233+
}
234+
],
235+
"space-in-brackets": 0,
236+
"space-in-parens": 0,
237+
"space-infix-ops": [
238+
2,
239+
{
240+
"int32Hint": false
241+
}
242+
],
243+
"space-return-throw-case": 2,
244+
"space-unary-ops": [
245+
2,
246+
{
247+
"words": true,
248+
"nonwords": false
249+
}
250+
],
251+
"spaced-line-comment": [
252+
2,
253+
"always"
254+
],
255+
"wrap-regex": 0,
256+
"no-var": 0,
257+
"max-len": [2, 80, 4]
258+
}
259+
}

.flowconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[ignore]
2+
.*/coverage/.*
3+
.*/scripts/.*
4+
.*/node_modules/flow-bin/.*
5+
6+
[include]
7+
8+
[libs]
9+
10+
[options]

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
*.swp
2+
*~
3+
.*.haste_cache.*
4+
.DS_Store
5+
.idea
6+
7+
lib
8+
node_modules
9+
npm-debug.log
10+
coverage

.travis.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
language: node_js
2+
3+
node_js:
4+
- "iojs"
5+
- "0.12"
6+
- "0.10"
7+
8+
notifications:
9+
email: false

CONTRIBUTING.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
Contributing
2+
============
3+
4+
After cloning this repo, ensure dependencies are installed by running:
5+
6+
```sh
7+
npm install
8+
```
9+
10+
GraphQL Relay is written in ES6 using [Babel](http://babeljs.io/), widely
11+
consumable JavaScript can be produced by running:
12+
13+
```sh
14+
npm run build
15+
```
16+
17+
Once `npm run build` has run, you may `import` or `require()` directly from
18+
node.
19+
20+
The full test suite can be evaluated by running:
21+
22+
```sh
23+
npm test
24+
```
25+
26+
While actively developing, we recommend running
27+
28+
```sh
29+
npm run watch
30+
```
31+
32+
in a terminal. This will watch the file system run lint, tests, and type
33+
checking automatically whenever you save a js file.
34+
35+
To lint the JS files and type interface checks run `npm run lint`.

LICENSE

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
BSD License
2+
3+
For GraphQL software
4+
5+
Copyright (c) 2015, Facebook, Inc. All rights reserved.
6+
7+
Redistribution and use in source and binary forms, with or without modification,
8+
are permitted provided that the following conditions are met:
9+
10+
* Redistributions of source code must retain the above copyright notice, this
11+
list of conditions and the following disclaimer.
12+
13+
* Redistributions in binary form must reproduce the above copyright notice,
14+
this list of conditions and the following disclaimer in the documentation
15+
and/or other materials provided with the distribution.
16+
17+
* Neither the name Facebook nor the names of its contributors may be used to
18+
endorse or promote products derived from this software without specific
19+
prior written permission.
20+
21+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
22+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
23+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
25+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
26+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
27+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
28+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
30+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

PATENTS

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Additional Grant of Patent Rights Version 2
2+
3+
"Software" means the GraphQL software distributed by Facebook, Inc.
4+
5+
Facebook, Inc. (“Facebook”) hereby grants to each recipient of the Software (“you”) a perpetual, worldwide, royalty-free, non-exclusive, irrevocable (subject to the termination provision below) license under any Necessary Claims, to make, have made, use, sell, offer to sell, import, and otherwise transfer the Software. For avoidance of doubt, no license is granted under Facebook’s rights in any patent claims that are infringed by (i) modifications to the Software made by you or any third party or (ii) the Software in combination with any software or other technology.
6+
7+
The license granted hereunder will terminate, automatically and without notice, if you (or any of your subsidiaries, corporate affiliates or agents) initiate directly or indirectly, or take a direct financial interest in, any Patent Assertion: (i) against Facebook or any of its subsidiaries or corporate affiliates, (ii) against any party if such Patent Assertion arises in whole or in part from any software, technology, product or service of Facebook or any of its subsidiaries or corporate affiliates, or (iii) against any party relating to the Software. Notwithstanding the foregoing, if Facebook or any of its subsidiaries or corporate affiliates files a lawsuit alleging patent infringement against you in the first instance, and you respond by filing a patent infringement counterclaim in that lawsuit against that party that is unrelated to the Software, the license granted hereunder will not terminate under section (i) of this paragraph due to such counterclaim.
8+
9+
A “Necessary Claim” is a claim of a patent owned by Facebook that is necessarily infringed by the Software standing alone.
10+
11+
A “Patent Assertion” is any lawsuit or other action alleging direct, indirect, or contributory infringement or inducement to infringe any patent, including a cross-claim or counterclaim.

0 commit comments

Comments
 (0)