Skip to content

Commit

Permalink
fix: replace queryType with extendType (#65)
Browse files Browse the repository at this point in the history
Nexus will error out if a previous queryType is already defined. We're
planning to include a "global" that sets this - so ensuring that
generated modules just extend Query will ensure this error does not
happen for a dev.
  • Loading branch information
alvincrespo authored Sep 30, 2020
1 parent 4bcca65 commit f6a6e46
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion template/_templates/graphql/new/graphql.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ export const CallPreference = enumType({
});

// Queries
schema.queryType({
schema.extendType({
type: 'Query',
definition: (t) => {
// List <%= plural %> Query (admin only)
t.crud.<%= plural.toLowerCase() %>({
Expand Down

0 comments on commit f6a6e46

Please sign in to comment.