Socket
Socket
Sign inDemoInstall

react-query-gql

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-query-gql - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

2

CHANGELOG.md

@@ -5,2 +5,4 @@ # Changelog

### [0.0.6](https://github.com/correttojs/graphql-codegen-apollo-next-ssr/compare/v0.0.5...v0.0.6) (2021-05-03)
### [0.0.5](https://github.com/correttojs/graphql-codegen-apollo-next-ssr/compare/v0.0.4...v0.0.5) (2021-05-03)

@@ -7,0 +9,0 @@

2

dist/gqlRequest.d.ts
import { TypedDocumentNode } from "@graphql-typed-document-node/core";
export declare const gqlRequest: <TData, TVariables>(document: TypedDocumentNode<TData, TVariables>, variables?: TVariables) => Promise<TData>;
export declare const gqlRequest: <TData, TVariables>(document: TypedDocumentNode<TData, TVariables>, variables?: TVariables, url?: string) => Promise<TData>;
import { GraphQLClient } from 'graphql-request';
import { useQuery, useMutation, QueryClient } from 'react-query';
const client = new GraphQLClient(`/api/graphql`);
const gqlRequest = (document, variables) => client.request(document, variables);
const gqlRequest = (document, variables, url = `/api/graphql`) => new GraphQLClient(url).request(document, variables);

@@ -12,3 +11,3 @@ const useReactQuery = (document, variables, options) => {

const useReactMutation = (document, options) => {
return useMutation((variables) => gqlRequest(document, variables), options);
return useMutation((variables) => gqlRequest(document, variables, options === null || options === void 0 ? void 0 : options.url), options);
};

@@ -15,0 +14,0 @@

import { TypedDocumentNode } from "@graphql-typed-document-node/core";
import { UseMutationOptions, UseMutationResult, UseQueryOptions, UseQueryResult } from "react-query";
export declare const useReactQuery: <TData, TVariables, TError = unknown>(document: TypedDocumentNode<TData, TVariables>, variables?: TVariables, options?: UseQueryOptions<TData, any, TData, import("react-query").QueryKey>) => UseQueryResult<TData, any>;
export declare const useReactMutation: <TData, TVariables, TError = unknown, TContext = unknown>(document: TypedDocumentNode<TData, TVariables>, options?: UseMutationOptions<TData, TError, TVariables, TContext>) => UseMutationResult<TData, TError, TVariables, TContext>;
export declare const useReactMutation: <TData, TVariables, TError = unknown, TContext = unknown>(document: TypedDocumentNode<TData, TVariables>, options?: UseMutationOptions<TData, TError, TVariables, TContext> & {
url: string;
}) => UseMutationResult<TData, TError, TVariables, TContext>;
{
"name": "react-query-gql",
"version": "0.0.5",
"version": "0.0.6",
"description": "React Query Gql Client",

@@ -5,0 +5,0 @@ "license": "MIT",

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