Giter Club home page Giter Club logo

example.graphql's Introduction

Example.GraphQL

HotChocolate API GraphQL with .NET8! Docs: https://chillicream.com/docs/hotchocolate/v13/get-started-with-graphql-in-net-core

Strawberry Shake GraphQL client with .NET8! Docs: https://chillicream.com/docs/strawberryshake/v13/get-started

This link from SingletonSean is specific to firebase setup: https://www.youtube.com/watch?v=7Xk0BuisZjg&list=PLA8ZIAm2I03g9z705U3KWJjTv0Nccw9pj&index=14

FIREBASE: https://console.firebase.google.com/ Create the project and then register the user and login in:

FIREBASE REGISTER ENDPOINT: https://identitytoolkit.googleapis.com/v1/accounts:signUp?key=[YOUR KEY]

{
 "email":"[email protected]",
 "password": "FooBar12345#@",
 "returnSecureToken": true
}

FIREBASE LOGIN ENDPOINT: https://identitytoolkit.googleapis.com/v1/accounts:signInWithPassword?key=[YOUR KEY]

{
 "email":"[email protected]",
 "password": "FooBar12345#@",
 "returnSecureToken": true
}

My implementation is based on this tutorial series but with .net8 and has diffrent approaches:

SingletonSean -> Learn how to setup a GraphQL API in .NET using the Hot Chocolate package. https://www.youtube.com/playlist?list=PLA8ZIAm2I03g9z705U3KWJjTv0Nccw9pj

SingletonSean -> Learn how to setup a GraphQL client application in .NET using the Strawberry Shake package. https://www.youtube.com/watch?v=6oJlibTwn_4&list=PLA8ZIAm2I03hQoVCdRzADYN6UBLnJNaSl

Example queries:

Banana Cake Pop queries: https://chillicream.com/products/bananacakepop/

query {
  courses {
        id
        name
        instructor {
                id
                salary
                }        
    }
}

query {
  specificCourses {
            edges {
                node {
                    id
                    name
                    instructor {
                            id
                            salary
                            }
                }
            }
  }
}

query {
  courseById(id: "364e30e4-9f80-4325-a70e-b06fb0f5301a") {
    id
    name
    subject
    instructor {
            id
            salary
            lastName
            }
  }
}

mutation {
  createCourse(
    courseInput: {
      name: "dragan",
      subject: SCIENCE,
      instructorId: "364e30e4-9f80-4325-a70e-b06fb0f5301a"
    } )
    {
      id
      name
      subject
      instructorId
    }
}

mutation {
  updateCourse(
    id: "4d511f7b-9c6b-4b90-bd14-a6ae4dc1c559",
    courseInput:  {
        name: "dragan",
        subject: SCIENCE,
        instructorId: "364e30e4-9f80-4325-a70e-b06fb0f5301a"
    } )
    {
      id
      name
      subject
      instructorId
    }
}

subscription {
    courseCreated {
      id
      name
      subject
    }
}

subscription {
    courseUpdated(
      courseId: "4d511f7b-9c6b-4b90-bd14-a6ae4dc1c559"
      ) {
      id
      name
      subject
      instructorId
    }
}

example.graphql's People

Contributors

admiraculix avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.