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

Why is HotChocolate adding its own global usings to my project #6560

Closed
1 task done
Arcalise08 opened this issue Sep 27, 2023 · 4 comments
Closed
1 task done

Why is HotChocolate adding its own global usings to my project #6560

Arcalise08 opened this issue Sep 27, 2023 · 4 comments
Assignees

Comments

@Arcalise08
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Product

Hot Chocolate

Describe the bug

Whenever I add HotChocolate to my project, I get namespace collisions because it automatically adds the following to my global using file.

global using global::GreenDonut;
global using global::HotChocolate;
global using global::HotChocolate.Types;
global using global::HotChocolate.Types.Relay;

I cant seem to find a way to disable this behavior without disabling all of my global usings which would not be good. When those lines, they come back also.

Steps to reproduce

  1. install HotChocolate

Relevant log output

No response

Additional Context?

No response

Version

16.6.0-preview.17

@michaelstaib
Copy link
Member

This is not a bug but a question.

@michaelstaib michaelstaib added ❓ question This issue is a question about feature of Hot Chocolate. 🌶️ hot chocolate labels Sep 27, 2023
@michaelstaib michaelstaib self-assigned this Sep 27, 2023
@michaelstaib
Copy link
Member

You can configure this and disable it by adding this property to your csproj:

<Project>
  <PropertyGroup>
    <!--HotChocolateImplicitUsings: default|disable|enable-->
    <HotChocolateImplicitUsings>default</HotChocolateImplicitUsings>
  </PropertyGroup>
</Project>

@Arcalise08
Copy link
Author

You can configure this and disable it by adding this property to your csproj:

<Project>
  <PropertyGroup>
    <!--HotChocolateImplicitUsings: default|disable|enable-->
    <HotChocolateImplicitUsings>default</HotChocolateImplicitUsings>
  </PropertyGroup>
</Project>

Thank you for the helpful response.

@michaelstaib
Copy link
Member

We have a slack channel slack.chillicream.com for question ... so if you get stuck join us there and post your questions to the #general channel.

@michaelstaib michaelstaib removed the ❓ question This issue is a question about feature of Hot Chocolate. label Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants