Skip to content
This repository has been archived by the owner on Jul 14, 2022. It is now read-only.

GraphQL Admin API Support #100

Open
montalvomiguelo opened this issue Aug 6, 2018 · 0 comments
Open

GraphQL Admin API Support #100

montalvomiguelo opened this issue Aug 6, 2018 · 0 comments

Comments

@montalvomiguelo
Copy link

What if we had a middleware to securely proxy graphql request from our apps to Shopify?

server side

// mounts '/auth' off of '/shopify'
app.use('/shopify', routes);

+ // mounts '/graphql'
+ app.use(proxy());

client side

fetch('/graphql', {
  method: 'POST',
  credentials: 'include',
  body: JSON.stringify({ query: '{ shop { name } }' }),
})
  .then(res => res.json())
  .then(res => console.log(res.data));

Like @shopify/koa-shopify-graphql-proxy

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant