Open DacoTaco opened 2 years ago
No, the URI type is a standard scalar and I guess the collision is rather with the GraphQL scalar type URI
.
The SS0006
error code comes from the GraphQL analyzer. This would be a bug ... will have a look at this.
eh? URI is a standard graphql scalar? i thought it was URL that was a standard scalar?
could the stale tag be removed? or has this bug been fixed?
Its not a standard type .... meant builtin.
Can you provide a minimal repro?
i will see if i can make a minimal example tomorrow, but in the meantime the problem was found in my ticketswap poller : https://github.com/DacoTaco/TicketSwapPoller/tree/main/TicketSwapPoller their schema has an URI object with (at least) a string called 'path'.
@michaelstaib , i have stripped the little code that was in there and have left everything out besides the basic schema + URI & something so it would generate the client. in the real program a query uses the URI scalar
@DacoTaco
I'm not able to build the solution. I get:
CSC : error SS0006: Method not found: 'Void StrawberryShake.CodeGeneration.CSharp.CSharpGeneratorSettings.set_RequestStrategy(StrawberryShake.Tools.Configuration.RequestStrategy)'. [/home/glen/projects/TicketSwapPoller_bare_minimum/TicketSwapPoller/TicketSwapPoller.csproj] /home/glen/projects/TicketSwapPoller_bare_minimum/TicketSwapPoller/Program.cs(23,10): error CS1061: 'IServiceCollection' does not contain a definition for 'AddTicketSwapClient' and no accessible extension method 'AddTicketSwapClient' accepting a first argument of type 'IServiceCollection' could be found (are you missing a using directive or an assembly reference?) [/home/glen/projects/TicketSwapPoller_bare_minimum/TicketSwapPoller/TicketSwapPoller.csproj]
@glen-84 : does the repo still compile?
@glen-84 : does the repo still compile?
No.
@glen-84 : does the repo still compile?
No.
i just did a fresh git clone of the repo i linked above, and it build just fine. the bare minimum indeed doesn't build, but it also shows the error of the URI. i can't remember what i did for the bare minimum, as it has been nearly 2 years since i started this issue, but i suggest using the repo if you really want something buildable. to cause the issue you can find the Uri in schema.graphql and uncomment it.
I've updated the Steps to reproduce
section in the initial comment.
Is there an existing issue for this?
Describe the bug
im currently using strawberry shake to generate a http client to communicate with a graphQL api. in the schema a type 'Uri' is defined with the following :
however, compiling my project with this in my schema.graphql i get
CSC : error SS0006: The name `Uri` was already registered by another type.
. I assume it is confusing it with System.Uri?i have no control over the api's schema so im stuck with this and fixing it on my client's side.
Steps to reproduce
git clone git@github.com:DacoTaco/TicketSwapPoller.git
TicketSwapPoller/schema.graphql
:dotnet build
Relevant log output
No response
Additional Context?
No response
Product
Strawberry Shake
Version
13.8.1