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

depot web schema #86

Merged
merged 3 commits into from
Jul 26, 2024
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
102 changes: 102 additions & 0 deletions genqlient.go

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

16 changes: 16 additions & 0 deletions resource_remote_builders.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,19 @@ func (client *Client) EnsureRemoteBuilder(ctx context.Context, orgID, appName, r

return data.EnsureMachineRemoteBuilder.Machine, data.EnsureMachineRemoteBuilder.App, nil
}

// in order to auto generate the EnsureDepotRemoteBuilder function, we just need to create a string assigned to a variable, making sure to include the query, the input type, and the response type
// we use pointer: true to make specifying the inputs optional
func (client *Client) EnsureDepotRemoteBuilder(ctx context.Context, input *EnsureDepotRemoteBuilderInput) (*EnsureDepotRemoteBuilderResponse, error) {
_ = `
# @genqlient(pointer: true)
mutation EnsureDepotRemoteBuilder($input: EnsureDepotRemoteBuilderInput!) {
ensureDepotRemoteBuilder(input:$input) {
buildId
buildToken
}
}
`

return EnsureDepotRemoteBuilder(ctx, client.genqClient, input)
}
Loading