New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@leveluptuts/comboquery

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@leveluptuts/comboquery

Inspired by: https://github.com/apollographql/graphql-tag/issues/169#issuecomment-568752182

latest
Source
npmnpm
Version
0.1.2
Version published
Maintainers
1
Created
Source

GraphQL Combo Query

Inspired by: https://github.com/apollographql/graphql-tag/issues/169#issuecomment-568752182

Usage

npm install @leveluptuts/comboquery

import SINGLE_POST_QUERY from './graphql/SinglePost.graphql'
import USER_QUERY from './graphql/UserQuery.graphql'
// Import your queries OR write them separately with gql``
const SomeComponent = () => {
  const { slug } = useParams()
	const COMBO_QUERY = comboQuery([SINGLE_POST_QUERY, USER_QUERY])

	// This example is using Apollo React Hooks
	const { loading, data, error } = useQuery(COMBO_QUERY, {
    variables: { slug },
	})

	// ... the rest of your stuffs

Level Up Tutorials

https://www.leveluptutorials.com

Cutting-edge, focused & high quality video tutorials for web developers and designers

Syntax

https://syntax.fm/

A Tasty Treats Podcast for Web Developers.

FAQs

Package last updated on 20 Feb 2020

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