Skip to content

Commit

Permalink
linting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mthomps4 committed Jul 2, 2021
1 parent a368475 commit 927e666
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,16 @@ to: graphql/modules/<%= name %>.ts
---
<% camelized = h.inflection.camelize(name) -%>
<% plural = h.inflection.pluralize(camelized) -%>
import { objectType, extendType, inputObjectType, queryField, mutationField, arg, list, nonNull /*, enumType*/ } from 'nexus';
import {
objectType,
extendType,
inputObjectType,
queryField,
mutationField,
arg,
list,
nonNull
} from 'nexus';

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

Expand Down
24 changes: 18 additions & 6 deletions packages/create-bison-app/template/graphql/modules/user.ts.ejs
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
import { objectType, inputObjectType, queryField, mutationField, stringArg, arg, nonNull, enumType, list } from 'nexus';
import {
objectType,
inputObjectType,
queryField,
mutationField,
stringArg,
arg,
nonNull,
enumType,
list,
} from 'nexus';
import { Role } from '@prisma/client';
import { UserInputError } from 'apollo-server-micro';

Expand All @@ -23,11 +33,13 @@ export const User = objectType({
t.field('profile', {
type: 'Profile',
resolve: (parent, _, context) => {
return context.prisma.user.findUnique({
where: { id: parent.id }
}).profile()
}
})
return context.prisma.user
.findUnique({
where: { id: parent.id },
})
.profile();
},
});
},
});

Expand Down

0 comments on commit 927e666

Please sign in to comment.