0.3.3 • Published 6 years ago

gatsby-source-morty v0.3.3

Weekly downloads
-
License
Unlicense
Repository
-
Last release
6 years ago

Gatsby MortyCMS Source

A gatsby plugin that runs a graphql query and parses it's response based on a schema to get your data properly into gatsby's world.

Usage

Add the following with your settings to the gatsby-config.js file under plugins:

{
  resolve: `gatsby-source-morty`,
  options: {
    account: `awesome-co`,
    accessToken: `00000000-0000-0000-0000-000000000000`
  }
},

For development, you can just add gatsby-source-morty to plugins and it will point to localhost:3000/graphql.

Process / Workflow

  1. Download and cache the schema from the server (utils/getSchema)
  2. Build client scheme from that schema
  3. Parse the client query to query AST and operation AST
  4. Gather fragment definitions
  5. Validate the query is valid for the schema
  6. Run query against server
  7. Use the type info of the schema to walk through the operations
  8. Recursively make nodes from the data, using fragments as needed
0.3.3

6 years ago

0.3.2

6 years ago

0.3.1

6 years ago

0.3.0

6 years ago

0.2.0

6 years ago

0.1.9

6 years ago

0.1.8

6 years ago

0.1.7

6 years ago

0.1.6

7 years ago

0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago