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: Add Prompt to setPromptVersionTag mutation #6010

Merged
merged 4 commits into from
Jan 14, 2025

Conversation

anticorrelator
Copy link
Contributor

resolves #5957

@dosubot dosubot bot added the size:XXL This PR changes 1000+ lines, ignoring generated files. label Jan 10, 2025
@anticorrelator anticorrelator changed the base branch from main to prompts January 10, 2025 23:52
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. and removed size:XXL This PR changes 1000+ lines, ignoring generated files. labels Jan 10, 2025
@@ -31,6 +32,7 @@ class SetPromptVersionTagInput:
@strawberry.type
class PromptVersionTagMutationPayload:
prompt_version_tag: Optional[PromptVersionTag]
prompt: Optional[Prompt]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically should always return this

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you want the delete mutation to always return the prompt as well?

@@ -101,4 +106,6 @@ async def set_prompt_version_tag(
raise Conflict("Failed to update PromptVersionTag.")

version_tag = to_gql_prompt_version_tag(updated_tag)
return PromptVersionTagMutationPayload(prompt_version_tag=version_tag, query=Query())
return PromptVersionTagMutationPayload(
prompt_version_tag=version_tag, prompt=prompt, query=Query()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you forgot to make it a gal type

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels Jan 13, 2025
@anticorrelator anticorrelator merged commit 676fe1d into prompts Jan 14, 2025
50 checks passed
@anticorrelator anticorrelator deleted the dustin/add-prompt-to-payload branch January 14, 2025 01:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:M This PR changes 30-99 lines, ignoring generated files.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[hub] [gql] return the prompt in tag setting mutations
2 participants