ChilliCream / graphql-platform

Welcome to the home of the Hot Chocolate GraphQL server for .NET, the Strawberry Shake GraphQL client for .NET and Banana Cake Pop the awesome Monaco based GraphQL IDE.
https://chillicream.com
MIT License
5.27k stars 748 forks source link

StrawberryShake 13: Unable to resolve type reference "Name!" #5860

Closed nightroman closed 1 year ago

nightroman commented 1 year ago

Is there an existing issue for this?

Product

Strawberry Shake

Describe the bug

StrawberryShake v13 fails on a HotChocolate GQL service schema with the error: Unable to resolve type reference "Name!"

Please find attached a project created with the following commands recommended here: https://chillicream.com/blog/2023/02/08/new-in-hot-chocolate-13#strawberry-shake

Source code: SSv13.zip

dotnet new tool-manifest
dotnet tool install StrawberryShake.Tools

dotnet new classlib
dotnet add package StrawberryShake.Blazor

dotnet graphql init https://api.nexar.com/graphql -n NexarClient

After adding the simple query Resources\Workspaces.graphql the build fails with this error

EXEC : error GQL: Unable to resolve type reference `Name!`.

See also:

Version

13.0.2

nightroman commented 1 year ago

@michaelstaib HC-13.2.0 looks like a long time to wait... Is this milestone a mistake perhaps/hopefully? v12 has its own issues, including some reported by me, and v13 was offered as a way forward...

michaelstaib commented 1 year ago

No, since this has a workaround.

michaelstaib commented 1 year ago

The workaround is removing the type.

nightroman commented 1 year ago

I am not aware of the workaround. The one suggested by @PascalSenn does not help, same error. We are blocked.

nightroman commented 1 year ago

The workaround is removing the type.

I was not aware up to now. Let me try.

But how do users of our service know about this workaround? They follow HC recommended steps of using Strawberry Shake, they get v13 this way. It does not build. Users stop trying and adopting not working software. They look for and adopt another client instead of Strawberry Shake. It's a possible and likely scenario.

michaelstaib commented 1 year ago

You removed the Name type and it says:

EXEC : error GQL: Unable to resolve type reference `Name!`.

The workaround I offered would be to download the schema manually and remove the Name type and directives that use it.

michaelstaib commented 1 year ago

The name type because of schema stitching.

nightroman commented 1 year ago

Updating the schema will require these workaround manual steps, too, presumably.

jhueppauff commented 1 year ago

If I remove all directives which are referencing Name! I am hit with different errors such as: EXEC(1,1): error GQL: All operations must be named.

Is there anything more I need to do?

nightroman commented 1 year ago

I cannot repro the original issue with later versions, so I close it.

andy-bout commented 1 year ago

I am getting this error using 13.4.0 (I am new to StrawberryShake and trying to understand it to determine if this is the technology we want to use in our development process). I have searched but can't find solutions for this problem.