Skip to content

Commit

Permalink
Update snapshots for improved pluralization
Browse files Browse the repository at this point in the history
  • Loading branch information
marcvberg committed Oct 17, 2022
1 parent d90ddfc commit db4ff43
Show file tree
Hide file tree
Showing 7 changed files with 198 additions and 161 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ export const schema: Schema = {
},
\\"enums\\": {},
\\"nonModels\\": {},
\\"codegenVersion\\": \\"1.0.0\\",
\\"version\\": \\"bf47977135db257ec69466688eea15d5\\"
};"
`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ extension Post {
public static let schema = defineSchema { model in
let post = Post.keys
model.pluralName = \\"Posts\\"
model.listPluralName = \\"Posts\\"
model.syncPluralName = \\"Posts\\"
model.attributes(
.index(fields: [\\"id\\", \\"title\\"], name: nil),
Expand Down Expand Up @@ -155,7 +156,8 @@ extension Comment {
public static let schema = defineSchema { model in
let comment = Comment.keys
model.pluralName = \\"Comments\\"
model.listPluralName = \\"Comments\\"
model.syncPluralName = \\"Comments\\"
model.attributes(
.index(fields: [\\"id\\", \\"content\\"], name: nil),
Expand Down Expand Up @@ -242,7 +244,8 @@ extension ModelCompositePk {
public static let schema = defineSchema { model in
let modelCompositePk = ModelCompositePk.keys
model.pluralName = \\"ModelCompositePks\\"
model.listPluralName = \\"ModelCompositePks\\"
model.syncPluralName = \\"ModelCompositePks\\"
model.attributes(
.index(fields: [\\"id\\", \\"dob\\"], name: nil),
Expand Down Expand Up @@ -322,7 +325,8 @@ extension ModelExplicitCustomPk {
public static let schema = defineSchema { model in
let modelExplicitCustomPk = ModelExplicitCustomPk.keys
model.pluralName = \\"ModelExplicitCustomPks\\"
model.listPluralName = \\"ModelExplicitCustomPks\\"
model.syncPluralName = \\"ModelExplicitCustomPks\\"
model.attributes(
.index(fields: [\\"userId\\"], name: nil),
Expand Down Expand Up @@ -400,7 +404,8 @@ extension ModelExplicitDefaultPk {
public static let schema = defineSchema { model in
let modelExplicitDefaultPk = ModelExplicitDefaultPk.keys
model.pluralName = \\"ModelExplicitDefaultPks\\"
model.listPluralName = \\"ModelExplicitDefaultPks\\"
model.syncPluralName = \\"ModelExplicitDefaultPks\\"
model.attributes(
.index(fields: [\\"id\\"], name: nil),
Expand Down Expand Up @@ -472,7 +477,8 @@ extension ModelImplicitDefaultPk {
public static let schema = defineSchema { model in
let modelImplicitDefaultPk = ModelImplicitDefaultPk.keys
model.pluralName = \\"ModelImplicitDefaultPks\\"
model.listPluralName = \\"ModelImplicitDefaultPks\\"
model.syncPluralName = \\"ModelImplicitDefaultPks\\"
model.attributes(
.primaryKey(fields: [modelImplicitDefaultPk.id])
Expand Down Expand Up @@ -561,7 +567,8 @@ extension Project {
public static let schema = defineSchema { model in
let project = Project.keys
model.pluralName = \\"Projects\\"
model.listPluralName = \\"Projects\\"
model.syncPluralName = \\"Projects\\"
model.attributes(
.index(fields: [\\"projectId\\", \\"name\\"], name: nil),
Expand Down Expand Up @@ -649,7 +656,8 @@ extension Team {
public static let schema = defineSchema { model in
let team = Team.keys
model.pluralName = \\"Teams\\"
model.listPluralName = \\"Teams\\"
model.syncPluralName = \\"Teams\\"
model.attributes(
.index(fields: [\\"teamId\\", \\"name\\"], name: nil),
Expand Down Expand Up @@ -771,7 +779,8 @@ extension ListContainer {
public static let schema = defineSchema { model in
let listContainer = ListContainer.keys
model.pluralName = \\"ListContainers\\"
model.listPluralName = \\"ListContainers\\"
model.syncPluralName = \\"ListContainers\\"
model.fields(
.id(),
Expand Down Expand Up @@ -878,7 +887,8 @@ extension Todo {
public static let schema = defineSchema { model in
let todo = Todo.keys
model.pluralName = \\"Todos\\"
model.listPluralName = \\"Todos\\"
model.syncPluralName = \\"Todos\\"
model.fields(
.id(),
Expand Down Expand Up @@ -950,7 +960,8 @@ extension task {
public static let schema = defineSchema { model in
let task = task.keys
model.pluralName = \\"tasks\\"
model.listPluralName = \\"tasks\\"
model.syncPluralName = \\"tasks\\"
model.fields(
.id(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const defaultJavaVisitorSettings = {
transformerVersion: 1,
generate: CodeGenGenerateEnum.code,
respectPrimaryKeyAttributesOnConnectionField: false,
improvePluralization: true,
}
const buildSchemaWithDirectives = (schema: String): GraphQLSchema => {
return buildSchema([schema, directives, scalars].join('\n'));
Expand Down
Loading

0 comments on commit db4ff43

Please sign in to comment.