orphic-inc / bc-stellar

BigCommerce supergraph

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Stellar

Proof of Concept Apollo Federation / supergraph for entry in BigCommerce's first BigHackathon. What is the supergraph?

Gateway and BigCommerce subgraph initial structure setup with quirks (e.g. incomplete schema, GQL queries incomplete).

Starting with Products / Customers subgraph would have resulted in queries to workaround login requirement, but wouldn't have unlocked more of the BigCommerce graph like login or wishlist would (being Mutations).

Contributions are welcome! There are many types that could be implemented as subgraphs.

BigCommerce subgraph

Usage

Query for a Storefront API Token with StorefrontToken:

query StellarQuery {
  StorefrontToken {
    data {
      token
    }
    errors {
      message
    }
  }
}

A store's system logs can be queried as well:

query StellarQuery {
SystemLogs {
    data {
      id
      type
      module
      severity
      summary
      message
      date_created
    }
    meta {
      pagination {
        total
        count
        per_page
        current_page
        total_pages
        links {
          current
        }
      }
    }
  }
}

Here's an example of both in action:

Stellar Query Example

Products subgraph

// TODO

Customers subgraph

// TODO

About

BigCommerce supergraph

License:MIT License


Languages

Language:JavaScript 100.0%