Consuming GraphQL in C#

Поделиться
HTML-код
  • Опубликовано: 18 сен 2024

Комментарии • 23

  • @SalmanMKC
    @SalmanMKC 4 года назад +3

    Last time I was consuming GraphQL I ended up using a JSON string parameter using the standard HTTP Client, this is SOOO much easier! Thank you for sharing this!

  • @egokick
    @egokick 3 года назад +2

    5:58 You can keep the line breaks by prefacing the string with @ e.g. @"test
    test"

  • @joro550
    @joro550 4 года назад +5

    This is cool, but I wish they would create a graphql code generator like they have for open API implementations

  • @rithlim6016
    @rithlim6016 2 года назад +1

    One thing that isn't quite obvious is that even though the response is dynamic, which is dependent on the query parameters, the model that is deserialized and mapped to the response isn't; it's based on a static response schema. So if you modify the query structure (removing or adding additional parameters), make sure your response model can handle the modified response.

  • @shaunb_123
    @shaunb_123 3 месяца назад

    Exactly what I was looking for, thanks!

  • @AdamsTaiwan
    @AdamsTaiwan 4 года назад +8

    For the query string wouldn't it be easier to just prefix with @ ?

    • @KrishnaKrish1
      @KrishnaKrish1 3 года назад

      Doesn't seem to work, not sure why

  • @williandavidlopezsanchez8331
    @williandavidlopezsanchez8331 4 года назад

    How can I do so that in the "schema" more than one type of "query" can be used if it only has one attribute to hold this "query" or how can it be done so that several types of objects can be consulted without the class "query" is so coupled

  • @bakhodirradjabov3982
    @bakhodirradjabov3982 Год назад

    Great demo thank you

  • @wasay456
    @wasay456 2 года назад

    How about authorization? should I use the standard http for that ?

  • @john-ee
    @john-ee 2 года назад

    Great series!

  • @barbieroalex
    @barbieroalex 4 года назад

    thanks for all the serie!

  • @R0L14
    @R0L14 3 года назад +1

    Can you share the repository's code?

  • @kevinmorales4846
    @kevinmorales4846 3 года назад

    hi, is it possible to consume with Graph.net Client with a Graph API created with Apollo Server?

    • @KrishnaKrish1
      @KrishnaKrish1 3 года назад

      Yes, need to send the query as shown in the video and the endpoint will be an Apolli Server

  • @robertrhythm69
    @robertrhythm69 4 года назад +1

    What happened to the GetDataFieldAs?

    • @robertrhythm69
      @robertrhythm69 4 года назад

      Add what version of the GraphQL.Client are you using?

    • @robgreen9479
      @robgreen9479 4 года назад

      @@robertrhythm69 - Video is from 4 months ago. I tried:
      GraphQL: 2.4 (from 18 months ago), also tried 3.0.0-preview-1490 from six months ago.
      GraphQLClient 3.1.4, 3.1.0 and 3.0.1 (from 5 months ago)

  • @baranikumars8952
    @baranikumars8952 2 года назад +1

    That guy is using mac book in microsoft channel🤣🤣🤣

  • @МаксимЧистяков-ч7ц
    @МаксимЧистяков-ч7ц 4 года назад +1

    GraphQLRequest Query string is awfull, ppl pls use wcf instead

    • @joro550
      @joro550 4 года назад +1

      Have you ever seen a WCF request? Those things are massive!

    • @МаксимЧистяков-ч7ц
      @МаксимЧистяков-ч7ц 4 года назад

      @@joro550 you can override any level of transport protocol or use a prepared pattern

    • @willinton06
      @willinton06 3 года назад

      @@МаксимЧистяков-ч7ц you can also write the data manually