npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

gqlmocks

v0.5.1

Published

<!-- commands --> * [`gqlmocks config generate`](#gqlmocks-config-generate) * [`gqlmocks config info`](#gqlmocks-config-info) * [`gqlmocks config validate`](#gqlmocks-config-validate) * [`gqlmocks handler generate`](#gqlmocks-handler-generate) * [`gqlmock

Downloads

32

Readme

Commands

gqlmocks config generate

generate or update a gqlmocks config file

USAGE
  $ gqlmocks config generate [--save-config <value>] [--format ts|js|json] [--schema.path <value>] [--schema.format
    SDL|SDL_STRING] [--handler.path <value>] [--force]

FLAGS
  --force                   overwrite config if one exists
  --format=<option>         specify the output format of the gqlmocks config
                            <options: ts|js|json>
  --handler.path=<value>
  --save-config=<value>     path to write generated config to
  --schema.format=<option>  <options: SDL|SDL_STRING>
  --schema.path=<value>     path to GraphQL schema

DESCRIPTION
  generate or update a gqlmocks config file

EXAMPLES
  $ gqlmocks config generate

  $ gqlmocks config generate --force

  $ gqlmocks config generate --save-config "./path/to/gqlmocks.config.js"

  $ gqlmocks config generate --schema.path "./graphql-mocks/schema.graphql" --schema.format "SDL_STRING"

  $ gqlmocks config generate --handler.path "./graphql-mocks/handler.js"

See code: src/commands/config/generate.ts

gqlmocks config info

display info about a gqlmocks config file

USAGE
  $ gqlmocks config info [-c <value>]

FLAGS
  -c, --config=<value>  path to config file

DESCRIPTION
  display info about a gqlmocks config file

EXAMPLES
  $ gqlmocks config info

  $ gqlmocks config info --config "../gqlmocks.config.js"

See code: src/commands/config/info.ts

gqlmocks config validate

validate a gqlmocks config file

USAGE
  $ gqlmocks config validate [-c <value>]

FLAGS
  -c, --config=<value>  path to config file

DESCRIPTION
  validate a gqlmocks config file

EXAMPLES
  $ gqlmocks config validate

  $ gqlmocks config validate --config "path/to/gqlmocks.config.js"

See code: src/commands/config/validate.ts

gqlmocks handler generate

generate a graphql handler

USAGE
  $ gqlmocks handler generate [-c <value>] [--save-handler <value>] [--force] [--format ts|js]

FLAGS
  -c, --config=<value>        path to config file
      --force                 overwrite config if one already exists
      --format=<option>       specify the file format of the created handler file
                              <options: ts|js>
      --save-handler=<value>  path to write generated config to

DESCRIPTION
  generate a graphql handler

EXAMPLES
  $ gqlconfig handler generate

  $ gqlconfig handler generate --force

  $ gqlconfig handler generate --save-handler "path/to/gqlmocks.config.js"

  $ gqlconfig handler generate --format "ts"

See code: src/commands/handler/generate.ts

gqlmocks handler info

display info about a graphql handler

USAGE
  $ gqlmocks handler info [-c <value>] [-h <value>]

FLAGS
  -c, --config=<value>   path to config file
  -h, --handler=<value>  path to file with graphql handler

DESCRIPTION
  display info about a graphql handler

EXAMPLES
  $ gqlmocks handler info

  $ gqlmocks handler info --handler path/to/handler.js

See code: src/commands/handler/info.ts

gqlmocks help [COMMAND]

display help for gqlmocks

USAGE
  $ gqlmocks help [COMMAND] [--json] [--all]

ARGUMENTS
  COMMAND  command to show help for

FLAGS
  --all   see all commands in CLI
  --json  Format output as json.

DESCRIPTION
  display help for gqlmocks

See code: @oclif/plugin-help

gqlmocks schema fetch

fetch and save a graphql schema locally

USAGE
  $ gqlmocks schema fetch [--header <value>... ] [-c <value>] [--save-schema <value>] [--force] [--format
    SDL|SDL_STRING] [--source <value>]

FLAGS
  -c, --config=<value>       path to config file
      --force                overwrite a schema file if one already exists
      --format=<option>      [default: SDL] format to save the schema as
                             <options: SDL|SDL_STRING>
      --header=<value>...    specify header(s) used in the request for remote schema specified by --schema flag
      --save-schema=<value>  path of file to save schema to
      --source=<value>       url of graphql api server or url of remote .graphql file

DESCRIPTION
  fetch and save a graphql schema locally

EXAMPLES
  $ gqlmocks schema fetch

  $ gqlmocks schema fetch --force

  $ gqlmocks schema fetch --source "http://remote.com/schema.graphql"

  $ gqlmocks schema fetch --source "http://remote-gql-api.com"

  $ gqlmocks schema fetch --source "http://remote-gql-api.com" --header "Authorization=Bearer abc123" --header "Header=Text"

  $ gqlmocks schema fetch --format "SDL_STRING"

See code: src/commands/schema/fetch.ts

gqlmocks schema info

display info about a graphql schema

USAGE
  $ gqlmocks schema info [-s <value>] [-c <value>]

FLAGS
  -c, --config=<value>  path to config file
  -s, --schema=<value>  local path to graphql schema (relative or absolute), remote url (graphql schema file or graphql
                        api endpoint)

DESCRIPTION
  display info about a graphql schema

EXAMPLES
  $ gqlmocks schema info

  $ gqlmocks schema info --schema "path/to/schema.graphql"

See code: src/commands/schema/info.ts

gqlmocks schema validate

validate a graphql schema file

USAGE
  $ gqlmocks schema validate [-c <value>] [-s <value>]

FLAGS
  -c, --config=<value>  path to config file
  -s, --schema=<value>  local path to graphql schema (relative or absolute), remote url (graphql schema file or graphql
                        api endpoint)

DESCRIPTION
  validate a graphql schema file

EXAMPLES
  $ gqlmocks schema validate

  $ gqlmocks schema validate --schema "path/to/schema.graphql"

See code: src/commands/schema/validate.ts

gqlmocks serve

run a local graphql server

USAGE
  $ gqlmocks serve [-c <value>] [-h <value>] [--header <value>... -s <value>] [-f] [-p <value>]

FLAGS
  -c, --config=<value>     path to config file
  -f, --fake               use @graphql-mocks/falso to fill in missing resolvers with fake data
  -h, --handler=<value>    path to file with graphql handler
  -p, --port=<value>       [default: 4444] Port to serve on
  -s, --schema=<value>     local path to graphql schema (relative or absolute), remote url (graphql schema file or
                           graphql api endpoint)
      --header=<value>...  specify header(s) used in the request for remote schema specified by --schema flag

DESCRIPTION
  run a local graphql server

EXAMPLES
  $ gqlmocks serve --schema ../schema.graphql

  $ gqlmocks serve --handler ../handler.ts

  $ gqlmocks serve --schema http://s3-bucket/schema.graphql --fake

  $ gqlmocks serve --schema http://graphql-api/ --fake

  $ gqlmocks serve --schema http://graphql-api/ --header "Authorization=Bearer token" --fake

See code: src/commands/serve.ts

gqlmocks version

USAGE
  $ gqlmocks version

See code: @oclif/plugin-version