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

Fixed Persisted query opt-in by MSBuild prop #5667

Merged
merged 1 commit into from
Jan 9, 2023

Conversation

benmccallum
Copy link
Collaborator

Since upgrading to v13, Debug builds are always using persisted queries, even if you setup your project with the following to attempt to only opt-in say a Release build.

<StrawberryShake_PersistedQueryDirectory Condition="'$(Configuration)' != 'Debug'">$(MSBuildProjectDirectory)\..\$(MSBuildProjectName)PersistedQueries</StrawberryShake_PersistedQueryDirectory>`

I believe this is just a copy-paste error here.

Relates to code here in the CLI.
https://github.com/ChilliCream/hotchocolate/blob/bbbaa34048a27bf8a5938405de38ececc5202fbe/src/StrawberryShake/Tooling/src/dotnet-graphql/GenerateCommand.cs#L73-L76

The idea of the string.IsNullOrEmpty is to allow opt-in via the MSBuild prop.

@michaelstaib michaelstaib changed the title fix: Persisted query opt-in by MSBuild prop Fixed Persisted query opt-in by MSBuild prop Jan 9, 2023
@michaelstaib michaelstaib merged commit 0456ec5 into main Jan 9, 2023
@michaelstaib michaelstaib deleted the bugfix/sshake-cli-call branch January 9, 2023 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants