1 | import devAssert from '../jsutils/devAssert';
|
2 | import defineToStringTag from '../jsutils/defineToStringTag';
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 | export var Source = function Source(body, name, locationOffset) {
|
13 | this.body = body;
|
14 | this.name = name || 'GraphQL request';
|
15 | this.locationOffset = locationOffset || {
|
16 | line: 1,
|
17 | column: 1
|
18 | };
|
19 | this.locationOffset.line > 0 || devAssert(0, 'line in locationOffset is 1-indexed and must be positive');
|
20 | this.locationOffset.column > 0 || devAssert(0, 'column in locationOffset is 1-indexed and must be positive');
|
21 | };
|
22 |
|
23 | defineToStringTag(Source);
|