Closed pwyszyns closed 5 months ago
Hi @michaelstaib I see that you've assigned yourself to this issue some time ago - were you able to reproduce it?
Here is an reproduction snippet:
mkdir repro
cd repro
dotnet new web
dotnet add package StrawberryShake.Transport.Http
dotnet add package StrawberryShake.CodeGeneration.CSharp.Analyzers
# dotnet tool install StrawberryShake.Tools --global
dotnet graphql init https://api.github.com/graphql -n GitHubClient --token xxxxxxxxxxxxxxxxxxxx
echo 'query Search($terms: String!) {
search(type: ISSUE, query: $terms, first: 5) {
nodes {
...on PullRequest {
title
author {
login
}
}
}
}
}' > Search.graphql
dotnet build
which gives us: CSC : error SS0006: Sequence contains no elements [/repro/repro.csproj]
Or if you wish not to deal with github tokens you can skip step with init and just download schema like so:
wget https://docs.github.com/public/schema.docs.graphql -O schema.graphql
Also observing something similar in octokit graphql but with search in overall rather than author 275
But the query it self seems to be fine and works as expected:
Closing, as I'm unable to reproduce this error using Strawberry Shake 12.15.3 or 13.9.5.
Is there an existing issue for this?
Describe the bug
I'm trying to fetch Pull Requests information from GitHub GraphQL endpoint, however, when I add
Author
to the query, code generation breaks on build with the errorCSC : error SS0006: Sequence contains no elements
.I have tested the same query from Thunder Client (VS code extension for HTTP calls) and it seems to be working fine, fetching the data properly.
Schema can be found here. GraphQL endpoint: https://api.github.com/graphql
The query I'm using is as follows:
I'm very new if it comes to GraphQL, so maybe there is an error within the query, but since it works outside of Strawberry Shake, I doubt that.
Steps to reproduce
CSC : error SS0006: Sequence contains no elements
relating to .csproj file.author { ... }
from the queryRelevant log output
CSC : error SS0006: Sequence contains no elements
Additional Context?
I also noticed that the generated file cannot be deleted - it will be re-created in few seconds from deletion. I'm not sure if it's related though.
Product
Strawberry Shake
Version
12.9.0