Skip to content
master
Switch branches/tags
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

JavaScript GraphQL Example

Example consuming a GraphQL API from JavaScript using graphql.js.

See it live

https://codewithhugo.com/js-graphql-client-example/

Run Node script

$ npm install
$ node fetch.js
{
  "pokemon": {
    "attacks": {
      "special": [
        {
          "name": "Discharge"
        },
        {
          "name": "Thunder"
        },
        {
          "name": "Thunderbolt"
        }
      ]
    }
  }
}

Run client-side app

Locally

  • Clone the repo

  • Install dependencies

    $ npm install
  • Run using parcel:

    $ npm start # or npx parcel index.html
  • Open http://localhost:1234

About

An example consuming a GraphQL API from JavaScript using graphql.js.

Topics

Resources

License

Releases

No releases published

Packages

No packages published