ChilliCream / ChilliCream/graphql-platform

Subscriptions tutorial: "The field `onSessionScheduled` does not exist on the type `Subscription`"

Open
#6,747 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

🌶️ strawberry shake 📚 documentation Area: Subscriptions
Dominant language
C#
Stars
5.8k
Forks
810
Avg merge
15h 39m
Merged PRs (30d)
98

Description

Is there an existing issue for this?
  • I have searched the existing issues
Product

Strawberry Shake

Describe the bug

Hi!

Running through the "Subscriptions" tutorial and failing at step 3! The build step generates two errors:

The field onSessionScheduleddoes not exist on the typeSubscription``

For clarity, here's the type Subscription as found in schema.graphql:

type Subscription {
  onPriceChange(symbols: [String!]): AssetPrice!
  onNotification: NotificationUpdate!
}

Specs:

Blazor WASM, .NET 8.0
StrawberryShake.Blazor v13.7.0
StrawberryShake.Transport.WebSockets v13.7.0

Steps to reproduce
  1. Complete the "Get started with Strawberry Shake and Blazor" tutorial (which I've made my own version of here)

  2. Work through the Subscriptions tutorial steps 1 and 2, using Nuget package manager to download StrawberryShake.Transport.WebSockets

  3. Run dotnet build

  4. Get error log (if you're me, at least!)

Relevant log output
StrawberryShake  dotnet build
MSBuild version 17.8.3+195e7f5a3 for .NET
  Determining projects to restore...
  Restored D:\Coding\StrawberryShake\Demo\Demo.csproj (in 333 ms).
  Generate C# Clients started.
  Generate CryptoClient started.
  Generate CryptoClient completed in 271 ms
EXEC(2,3): error SS0002: The field `onSessionScheduled` does not exist on the type `Subscription`. [D:\Coding\StrawberryShake\Demo\Demo.csproj]
C:\Users\jacks\.nuget\packages\strawberryshake.blazor\13.7.0\build\StrawberryShake.Blazor.targets(79,5): error MSB3073: The command "dotnet "C:\Users\jacks\.nuget\packages\strawb
erryshake.blazor\13.7.0\build\..\tools\net8\dotnet-graphql.dll" generate "D:\Coding\StrawberryShake\Demo" -o "D:\Coding\StrawberryShake\Demo\obj\Debug\net8.0\berry" -n Demo -a md
5 -r" exited with code 1. [D:\Coding\StrawberryShake\Demo\Demo.csproj]

Build FAILED.

EXEC(2,3): error SS0002: The field `onSessionScheduled` does not exist on the type `Subscription`. [D:\Coding\StrawberryShake\Demo\Demo.csproj]
C:\Users\jacks\.nuget\packages\strawberryshake.blazor\13.7.0\build\StrawberryShake.Blazor.targets(79,5): error MSB3073: The command "dotnet "C:\Users\jacks\.nuget\packages\strawb
erryshake.blazor\13.7.0\build\..\tools\net8\dotnet-graphql.dll" generate "D:\Coding\StrawberryShake\Demo" -o "D:\Coding\StrawberryShake\Demo\obj\Debug\net8.0\berry" -n Demo -a md
5 -r" exited with code 1. [D:\Coding\StrawberryShake\Demo\Demo.csproj]
    0 Warning(s)
    2 Error(s)

Time Elapsed 00:00:01.55
Additional Context?

No response

Version

13.7.0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Strawberry Shake v13 Subscriptions tutorial, especially step 3, and compare its operation with the Subscription type shown in schema.graphql. Reproduce the problem with dotnet build using the listed Strawberry Shake 13.7.0 packages; done means the tutorial's documented steps and schema agree and the build completes without SS0002.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.