New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@gramps/data-source-xkcd

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gramps/data-source-xkcd

GrAMPS GraphQL data source to load xkcd comics.

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-57.14%
Maintainers
1
Weekly downloads
 
Created
Source

GrAMPS · An easier way to manage the data sources powering your GraphQL server

GrAMPS GraphQL Data Source for xkcd

license npm version Build Status Maintainability Test Coverage Greenkeeper badge

Load the latest xkcd comic, or look one up by its ID.

This is a GrAMPS data source for GraphQL.

Example Queries

To get all available fields for this data source, try out these two queries in GraphiQL. (See the quickstart for details on starting GraphiQL.)

query getLatestComic {
  getLatestComic {
    ...ComicFields
  }
}

query getComicById($id: ID!) {
  getComicById(id: $id) {
    ...ComicFields
  }
}

fragment ComicFields on XKCD_Comic {
  num
  title
  safe_title
  img
  alt
  transcript
  year
  month
  day
  link
  news
}

Use the following arguments:

{
  "id": 1900
}

Quickstart

# Clone the repo
git clone git@github.com:gramps-graphql/data-source-xkcd.git

# Move into it
cd data-source-xkcd/

# Install dependencies
yarn install

To Develop with Mock Data

Start the app with the following command:

# Develop with mock data
yarn dev:mock-data

Open the URL displayed in your console to see GraphiQL.

To Develop with Live Data

Once you’ve got your data source configured to load live data, you can enable live data in development:

# Develop with live data
yarn dev

Open the URL displayed in your console to see GraphiQL.

Notes for Developers

Currently, there is no watch capability (PRs welcome!), so the service needs to be stopped (control + C) and restarted (yarn [dev:mock-data|dev]) to reflect new changes to the data source.

Keywords

FAQs

Package last updated on 18 Feb 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc