Skip to content

Commit

Permalink
Added createTome mutation and related tests (#95)
Browse files Browse the repository at this point in the history
  • Loading branch information
KCarretto authored Feb 7, 2023
1 parent 4ef277d commit fffaf7d
Show file tree
Hide file tree
Showing 14 changed files with 406 additions and 296 deletions.
28 changes: 28 additions & 0 deletions tavern/ent/gql_mutation_input.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 2 additions & 10 deletions tavern/ent/gql_node.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

54 changes: 0 additions & 54 deletions tavern/ent/gql_where_input.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions tavern/ent/schema/tome.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ func (Tome) Fields() []ent.Field {
Comment("JSON string describing what parameters are used with the tome"),
field.String("hash").
MaxLen(100).
Annotations(
entgql.Skip(entgql.SkipAll),
).
Comment("A SHA3 digest of the eldritch field"),
field.String("eldritch").
Comment("Eldritch script that will be executed when the tome is run"),
Expand All @@ -53,6 +56,9 @@ func (Tome) Edges() []ent.Edge {
func (Tome) Annotations() []schema.Annotation {
return []schema.Annotation{
entgql.QueryField(),
entgql.Mutations(
entgql.MutationCreate(),
),
}
}

Expand Down
98 changes: 98 additions & 0 deletions tavern/graphql/generated/mutation.generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit fffaf7d

Please sign in to comment.