Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: increase ID length to 256 #252

Merged
merged 1 commit into from
Sep 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/graphql/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ export class GqlEntityController {
return { name: 'float', options: [23] };
case GraphQLString:
case GraphQLID:
return { name: 'string', options: [128] };
return { name: 'string', options: [256] };
}

if (type instanceof GraphQLObjectType) {
Expand All @@ -475,7 +475,7 @@ export class GqlEntityController {
idField.type.ofType instanceof GraphQLScalarType &&
['String', 'ID'].includes(idField.type.ofType.name)
) {
return { name: 'string', options: [128] };
return { name: 'string', options: [256] };
}
}

Expand Down
2 changes: 1 addition & 1 deletion test/unit/graphql/__snapshots__/controller.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ exports[` 3`] = `"'id' field for type Participant is not a scalar type."`;

exports[`GqlEntityController createEntityStores should work 1`] = `
"drop table if exists \`votes\`;
create table \`votes\` (\`id\` integer not null, \`name\` varchar(128), \`authenticators\` json, \`big_number\` bigint, \`decimal\` float, \`big_decimal\` float, primary key (\`id\`));
create table \`votes\` (\`id\` integer not null, \`name\` varchar(256), \`authenticators\` json, \`big_number\` bigint, \`decimal\` float, \`big_decimal\` float, primary key (\`id\`));
create index \`votes_id_index\` on \`votes\` (\`id\`);
create index \`votes_name_index\` on \`votes\` (\`name\`);
create index \`votes_big_number_index\` on \`votes\` (\`big_number\`);
Expand Down