Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rivet-graphql

Package Overview
Dependencies
Maintainers
4
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rivet-graphql - npm Package Compare versions

Comparing version 0.4.0 to 0.5.0-canary-20230119003206

.changeset/config.json

3

index.d.ts

@@ -6,3 +6,3 @@ declare function _exports(url: string, options: import("graphql-request/dist/types.dom").RequestInit & {

<T = any>({ query, dependencies, variables }: {
query: string;
query: string | DocumentNode;
dependencies?: {

@@ -17,2 +17,3 @@ fragmentSpec?: FragmentSpec;

export type GQLRequestInit = import("graphql-request/dist/types.dom").RequestInit;
export type DocumentNode = import("graphql/language/ast").DocumentNode;
export type exports = import("graphql-request").GraphQLClient;

@@ -19,0 +20,0 @@ export type FragmentSpec = {

@@ -7,2 +7,3 @@ //@ts-check

/** @typedef { import("graphql-request/dist/types.dom").RequestInit} GQLRequestInit */
/** @typedef { import("graphql/language/ast").DocumentNode} DocumentNode */
/** @typedef { import("graphql-request").GraphQLClient } */

@@ -41,3 +42,3 @@

* @param {Object} params
* @param {string} params.query
* @param {string | DocumentNode} params.query
* @param {{ fragmentSpec?: FragmentSpec }[]} [params.dependencies]

@@ -112,3 +113,3 @@ * @param {Record<string, any>} [params.variables]

* @param {Record<string, unknown>} variables
* @param {string} query
* @param {string | DocumentNode} query
* @returns {string}

@@ -122,7 +123,9 @@ */

// If there are no variables, we can return
if (!Object.keys(vars).length) return query
if (!Object.keys(vars).length) {
return typeof query === 'string' ? query : print(query)
}
// Otherwise, inject those variables into the query's params.
// First we parse the query into an AST
const ast = parse(query)
const ast = typeof query === 'string' ? parse(query) : query

@@ -129,0 +132,0 @@ // See function definition below for details

{
"name": "rivet-graphql",
"description": "a relay-like graphql data loading system for nextjs",
"version": "0.4.0",
"version": "0.5.0-canary-20230119003206",
"author": "Jeff Escalante",

@@ -14,4 +14,5 @@ "bugs": {

"devDependencies": {
"@changesets/changelog-github": "^0.4.8",
"@changesets/cli": "^2.26.0",
"jest": "^26.4.2",
"release": "^6.3.0",
"rewire": "^5.0.0",

@@ -35,5 +36,3 @@ "typescript": "^4.6.2"

"scripts": {
"release:major": "npm run generate:types && release major && npm publish",
"release:minor": "npm run generate:types && release minor && npm publish",
"release:patch": "npm run generate:types && release patch && npm publish",
"release:canary": "npm run generate:types && changeset publish --tag canary",
"test": "jest",

@@ -40,0 +39,0 @@ "generate:types": "tsc -p ."

Sorry, the diff of this file is not supported yet

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