Check out how we can test GraphQL subscriptions with Hot Chocolate.

แชร์
ฝัง
  • เผยแพร่เมื่อ 4 ต.ค. 2024
  • Hi everyone,
    In this episode, I will look at how we can test GraphQL subscriptions and Authorized parts of the schema with Hot Chocolate and Cookie Crumble.
    Please, if you like our project, give us a star on GitHub:
    github.com/Chi...
    Workshops:
    chillicream.co...
    Hot Chocolate GraphQL .NET server version used in this video: www.nuget.org/...
    Code Example:
    github.com/Chi...
    Social Media:
    Follow me on GitHub: bit.ly/michael...
    Follow me on Twitter: bit.ly/michael...
    Connect on LinkedIn: bit.ly/michael...
    Web:
    chillicream.com
    #dotnet #graphql #hotchocolate #testing

ความคิดเห็น • 6

  • @guincode
    @guincode ปีที่แล้ว

    Hello, thank you for this video.... Could you please create a new video to explain how to perform Windows authentication using Hot Chocolate?

  • @DavidDancy-ht4qs
    @DavidDancy-ht4qs ปีที่แล้ว +1

    Hi this looks great! I tried to install CookieCrumble but failed because v13.5 requires a corresponding HotChocolate.Fusion (which doesn't exist) and v14 requires HotChocolate v14 which I can't upgrade to just yet. Would it be possible to have a CookieCrumble v13 without the Fusion dependency?

    • @ChilliCream
      @ChilliCream  ปีที่แล้ว +1

      Sorry for that :D I will update the package with 13.1

  • @ritumariajoy4126
    @ritumariajoy4126 ปีที่แล้ว

    Hey how to deal with batching attack in graphql hot chocolate. Please help with a video
    // batch query attack (hello DoS)
    query {
    getUsers(first: 1000)
    second: getUsers(first: 2000)
    third: getUsers(first: 3000)
    fourth: getUsers(first: 4000)
    }

    • @ChilliCream
      @ChilliCream  ปีที่แล้ว +1

      Hot Chocolate has operation complexity rules built-in I will add a video.

    • @ritumariajoy4126
      @ritumariajoy4126 ปีที่แล้ว +1

      @@ChilliCream
      ​ Hi Team,
      Thank you for the response
      I tried operation complexity rules, but my one graphql get method has some 10 properties which can need to be exposed..
      By setting up a complexity rule of 10 using
      SetRequestOptions(_ => new HotChocolate.Execution.Options.RequestExecutorOptions
      {
      ExecutionTimeout = TimeSpan.FromMinutes(10) ,
      Complexity = { ApplyDefaults = false ,Enable = true , DefaultResolverComplexity = 1, MaximumAllowed = 10},
      })
      ---------------------------
      query {
      getUsers(first: 1000)
      {
      Variable1
      Variable2
      Variable3
      Variable4
      Variable5
      Variable6
      Variable7
      Variable8
      }
      second: getUsers(first: 2000)
      {
      Variable1
      Variable2
      }
      }

      Is there any way I can restrict my graphql request to not accept second variable alias name for getUsers.
      Thanks in advance.