Skip to content

Commit 22eba0c

Browse files
committed
chore: Update naming root to source
1 parent 22ea271 commit 22eba0c

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

tests/fixtures/schema.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
1-
import { extendType, objectType } from 'nexus';
21
import { AuthenticationError } from 'apollo-server';
2+
import { extendType, objectType } from 'nexus';
33

44
import { ruleType } from '../../src';
55

66
export const Test = objectType({
77
name: 'Test',
88
shield: ruleType({
9-
resolve(_root, _args, _ctx) {
9+
resolve(_source, _args, _ctx) {
1010
throw new AuthenticationError('OBJECT');
1111
},
1212
}),
1313
definition(t) {
1414
t.string('publicProp', {
1515
shield: ruleType({
16-
resolve(_root, _args, _ctx) {
16+
resolve(_source, _args, _ctx) {
1717
return true;
1818
},
1919
}),
2020
});
2121
t.string('privateProp', {
2222
shield: ruleType({
23-
resolve(_root, _args, _ctx) {
23+
resolve(_source, _args, _ctx) {
2424
return false;
2525
},
2626
}),
2727
});
2828
t.string('throwProp', {
2929
shield: ruleType({
30-
resolve(_root, _args, _ctx) {
30+
resolve(_source, _args, _ctx) {
3131
throw new AuthenticationError('CUSTOM');
3232
},
3333
}),
@@ -41,7 +41,7 @@ export const QueryTest = extendType({
4141
definition(t) {
4242
t.field('test', {
4343
type: Test,
44-
resolve(_root, _args, _ctx) {
44+
resolve(_source, _args, _ctx) {
4545
return {
4646
publicProp: 'public',
4747
privateProp: 'private',

tests/fixtures/server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { makeSchema } from 'nexus';
21
import { ApolloServer, ForbiddenError } from 'apollo-server';
2+
import { makeSchema } from 'nexus';
33
import * as path from 'path';
44

55
import {

0 commit comments

Comments
 (0)