Skip to content

Commit

Permalink
feat: rename OrderBy type name to match TheGraph
Browse files Browse the repository at this point in the history
  • Loading branch information
Sekhmet committed Oct 2, 2023
1 parent 2ae5b30 commit 1f4acc6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/graphql/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ export class GqlEntityController {
const { where, orderByValues } = getWhereType(type);

const OrderByEnum = new GraphQLEnumType({
name: `OrderBy${type.name}Fields`,
name: `${type.name}_orderBy`,
values: orderByValues
});

Expand Down
4 changes: 2 additions & 2 deletions test/unit/graphql/__snapshots__/controller.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ create index \`votes_big_decimal_index\` on \`votes\` (\`big_decimal\`)"
exports[`GqlEntityController generateQueryFields should work 1`] = `
"type Query {
vote(id: Int!): Vote
votes(first: Int, skip: Int, orderBy: OrderByVoteFields, orderDirection: OrderDirection, where: Vote_filter): [Vote]
votes(first: Int, skip: Int, orderBy: Vote_orderBy, orderDirection: OrderDirection, where: Vote_filter): [Vote]
}
type Vote {
Expand All @@ -28,7 +28,7 @@ type Vote {
authenticators: [String]
}
enum OrderByVoteFields {
enum Vote_orderBy {
id
name
}
Expand Down

0 comments on commit 1f4acc6

Please sign in to comment.