Skip to content
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
76 changes: 75 additions & 1 deletion tavern/internal/ent/gql_collection.go

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

29 changes: 19 additions & 10 deletions tavern/internal/ent/gql_edge.go

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

1 change: 1 addition & 0 deletions tavern/internal/ent/schema/quest.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ func (Quest) Edges() []ent.Edge {
edge.To("tasks", Task.Type).
Annotations(
entgql.Skip(entgql.SkipMutationCreateInput),
entgql.RelayConnection(),
).
Comment("Tasks tracking the status and output of individual tome execution on targets"),
edge.To("creator", User.Type).
Expand Down
119 changes: 87 additions & 32 deletions tavern/internal/graphql/generated/ent.generated.go

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

30 changes: 26 additions & 4 deletions tavern/internal/graphql/generated/root_.generated.go

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

14 changes: 11 additions & 3 deletions tavern/internal/graphql/quest_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,16 +181,24 @@ func newCreateQuestTest(gqlClient *client.Client, beaconIDs []int, input ent.Cre
mut := `mutation newCreateQuestTest($beaconIDs: [ID!]!, $input: CreateQuestInput!) { createQuest(beaconIDs:$beaconIDs, input:$input) {
id
tasks {
id
edges {
node {
id
}
}
}
} }`

// Make our request to the GraphQL API
var resp struct {
CreateQuest struct {
ID string
Tasks []struct {
ID string
Tasks struct {
Edges []struct {
Node struct {
ID string
} `json:"node"`
} `json:"edges"`
} `json:"tasks"`
}
}
Expand Down
Loading