3.0.141 • Published 8 months ago

@faststore-b2b/api v3.0.141

Weekly downloads
-
License
MIT
Repository
-
Last release
8 months ago

Installation

From the command line in your project directory, run yarn add @faststore-b2b/api.

yarn add @faststore-b2b/api

Usage

With servers like express:

import { execute } from 'graphql'
import { getSchema } from '@faststore-b2b/api'

import express from 'express'

const app = express()

app.get('/graphql', async (req, res) => {
  const { query, operationName, variables } = req.body

  const result = await execute({
    schema: await getSchema(),
    variableValues: variables,
    operationName,
  })

  res.status(200)
  res.send(result)
})

Docs

For more information, please refer to our documentation: https://v1.faststore.dev/reference/api/faststore-api