0

I am following the official Strawberry Shake guide: https://chillicream.com/docs/strawberryshake/v13/get-started/console

Specifically Step 4: Add a GraphQL client to your project using the CLI tools I run this command:

dotnet graphql init https://integrate.somecloud.com/graphql -n SomeClient -p ./StrawberryShakeConsole --headers Accept-Encoding=gzip --tokenEndpoint https://integrate.somecloud.com/auth --token eyJhbGciOiJIUzI1...

I receive the following error:

Download schema started.
Download schema completed in 557 ms
Unhandled exception. System.Text.Json.JsonException: '0x1F' is an invalid start of a value. Path: $ | LineNumber: 0 | BytePositionInLine: 0.
 ---> System.Text.Json.JsonReaderException: '0x1F' is an invalid start of a value. LineNumber: 0 | BytePositionInLine: 0.

If I remove:

--headers Accept-Encoding=gzip

I receive the error:

Download schema started.
error INTROSPECTION_ERROR: Response too large

I can't download the schema because it is too large but if I use gzip compression it throws a JsonException. Any ideas on how I can get around this to use Strawberry Shake?

Baxter
  • 5,633
  • 24
  • 69
  • 105
  • 1
    gzip will typically compress by a factor of two or three. If it will work with gzip compression, but not without, that means that you are right on the edge of it not working with gzip as well. It looks like you need to find a better solution to your problem. – Mark Adler Aug 21 '23 at 20:46
  • 1
    Furthermore, I doubt that it will work with gzip. If the code giving the "Reponse too large" error is looking at the JSON, then you will _still_ get that error when it looks at the exact same JSON after decompression. – Mark Adler Aug 21 '23 at 20:48

0 Answers0