Skip to content

Commit 927e666

Browse files
committed
linting fixes
1 parent a368475 commit 927e666

File tree

2 files changed

+28
-7
lines changed

2 files changed

+28
-7
lines changed

packages/create-bison-app/template/_templates/graphql/new/graphql.ejs

+10-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,16 @@ to: graphql/modules/<%= name %>.ts
33
---
44
<% camelized = h.inflection.camelize(name) -%>
55
<% plural = h.inflection.pluralize(camelized) -%>
6-
import { objectType, extendType, inputObjectType, queryField, mutationField, arg, list, nonNull /*, enumType*/ } from 'nexus';
6+
import {
7+
objectType,
8+
extendType,
9+
inputObjectType,
10+
queryField,
11+
mutationField,
12+
arg,
13+
list,
14+
nonNull
15+
} from 'nexus';
716

817
import { isAdmin } from '../../services/permissions';
918

packages/create-bison-app/template/graphql/modules/user.ts.ejs

+18-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
1-
import { objectType, inputObjectType, queryField, mutationField, stringArg, arg, nonNull, enumType, list } from 'nexus';
1+
import {
2+
objectType,
3+
inputObjectType,
4+
queryField,
5+
mutationField,
6+
stringArg,
7+
arg,
8+
nonNull,
9+
enumType,
10+
list,
11+
} from 'nexus';
212
import { Role } from '@prisma/client';
313
import { UserInputError } from 'apollo-server-micro';
414

@@ -23,11 +33,13 @@ export const User = objectType({
2333
t.field('profile', {
2434
type: 'Profile',
2535
resolve: (parent, _, context) => {
26-
return context.prisma.user.findUnique({
27-
where: { id: parent.id }
28-
}).profile()
29-
}
30-
})
36+
return context.prisma.user
37+
.findUnique({
38+
where: { id: parent.id },
39+
})
40+
.profile();
41+
},
42+
});
3143
},
3244
});
3345

0 commit comments

Comments
 (0)