Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/obrien-k/bigcommerce-apollo-hackathon
federation proof of concept
https://github.com/obrien-k/bigcommerce-apollo-hackathon
graphql hacktoberfest
Last synced: 12 days ago
JSON representation
federation proof of concept
- Host: GitHub
- URL: https://github.com/obrien-k/bigcommerce-apollo-hackathon
- Owner: obrien-k
- License: mit
- Created: 2022-08-24T02:37:33.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-10-18T00:44:34.000Z (about 2 years ago)
- Last Synced: 2024-10-12T07:14:32.927Z (27 days ago)
- Topics: graphql, hacktoberfest
- Language: JavaScript
- Homepage:
- Size: 579 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Stellar
Proof of Concept Apollo Federation / supergraph for entry in BigCommerce's first [BigHackathon](https://twitter.com/hashtag/bighackathon). [What is the supergraph?](https://www.apollographql.com/blog/announcement/backend/the-supergraph-a-new-way-to-think-about-graphql/)
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](https://developer.bigcommerce.com/graphql-api-reference).
## BigCommerce subgraph
### Usage
Query for a [Storefront API Token](https://developer.bigcommerce.com/api-reference/044bc7b21e5b4-create-a-token) with StorefrontToken:
```
query StellarQuery {
StorefrontToken {
data {
token
}
errors {
message
}
}
}
```
A store's [system logs](https://developer.bigcommerce.com/api-reference/6908d02370409-get-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](stellarqueryexample.jpg "Stellar Query Example")
## Products subgraph
// TODO
## Customers subgraph
// TODO