Skip to content

Commit

Permalink
Merge pull request #29 from groupon/dbushong/feature/main/revert-revert
Browse files Browse the repository at this point in the history
Revert safe-fields change
  • Loading branch information
dbushong authored Oct 22, 2021
2 parents 5f26271 + 951a083 commit 5a90f7c
Show file tree
Hide file tree
Showing 4 changed files with 5,223 additions and 41 deletions.
10 changes: 6 additions & 4 deletions lib/generator/swagql.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,16 @@ const FETCH = Symbol(GRAPHQL_FETCH_SYMBOL_NAME);
const VERIFY_AUTH_STATUS = Symbol(GRAPHQL_VERIFY_AUTH_STATUS_SYMBOL_NAME)`);

const buildPostfix = template(`\
const Query = new GraphQLObjectType({
const queryFields = QUERY_FIELDS;
const Query = queryFields && new GraphQLObjectType({
name: 'Query',
fields: QUERY_FIELDS,
fields: queryFields,
});
const Mutation = new GraphQLObjectType({
const mutationFields = MUTATION_FIELDS;
const Mutation = mutationFields && new GraphQLObjectType({
name: 'Mutation',
fields: MUTATION_FIELDS,
fields: mutationFields,
});
module.exports = {
Expand Down
Loading

0 comments on commit 5a90f7c

Please sign in to comment.