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

@shopify/graphql-testing

Package Overview
Dependencies
Maintainers
19
Versions
135
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@shopify/graphql-testing - npm Package Compare versions

Comparing version 0.0.0-snapshot-20220830190822 to 0.0.0-snapshot-20220907212019

6

build/cjs/graphql-controller.js

@@ -13,3 +13,2 @@ 'use strict';

constructor(mock, {
possibleTypes = {},
cacheOptions = {},

@@ -33,6 +32,3 @@ links = []

const cache = new client.InMemoryCache({
possibleTypes,
...cacheOptions
});
const cache = new client.InMemoryCache(cacheOptions);
this.mockLink = new mocks.MockLink(mock || defaultGraphQLMock);

@@ -39,0 +35,0 @@ const link = client.ApolloLink.from([...links, new inflight.InflightLink({

2

build/ts/factory.d.ts
import { GraphQL, Options } from './graphql-controller';
import { GraphQLMock } from './types';
export declare function createGraphQLFactory(options?: Options): (mock?: GraphQLMock | undefined) => GraphQL;
export declare function createGraphQLFactory(options?: Options): (mock?: GraphQLMock) => GraphQL;
//# sourceMappingURL=factory.d.ts.map

@@ -1,7 +0,6 @@

import { ApolloClient, ApolloLink, ApolloReducerConfig, PossibleTypesMap } from '@apollo/client';
import { ApolloClient, ApolloLink, InMemoryCacheConfig } from '@apollo/client';
import { Operations } from './operations';
import { GraphQLMock, FindOptions } from './types';
export interface Options {
possibleTypes?: PossibleTypesMap;
cacheOptions?: ApolloReducerConfig;
cacheOptions?: InMemoryCacheConfig;
links?: ApolloLink[];

@@ -18,3 +17,3 @@ }

private readonly mockLink;
constructor(mock: GraphQLMock | undefined, { possibleTypes, cacheOptions, links }?: Options);
constructor(mock: GraphQLMock | undefined, { cacheOptions, links }?: Options);
update(mock: GraphQLMock): void;

@@ -21,0 +20,0 @@ resolveAll(options?: FindOptions): Promise<void>;

{
"name": "@shopify/graphql-testing",
"version": "0.0.0-snapshot-20220830190822",
"version": "0.0.0-snapshot-20220907212019",
"license": "MIT",

@@ -5,0 +5,0 @@ "description": "Utilities to create mock GraphQL factories",

@@ -20,7 +20,9 @@ # `@shopify/graphql-testing`

The default utility exported by this library is `createGraphQLFactory`. This factory accepts an optional options argument that allows you to pass a `unionOrIntersectionTypes` array and/ or additional `cacheOptions` that will be used to construct an Apollo in-memory cache and/ or `links` which can contain `ApolloLink`s that will be passed to the apollo client links.
The default utility exported by this library is `createGraphQLFactory`. This factory accepts an optional options argument that allows you to pass a `cacheOptions` that will be used to construct an Apollo in-memory cache and/ or `links` which can contain `ApolloLink`s that will be passed to the apollo client links.
```js
const createGraphQL = createGraphQLFactory({
unionOrIntersectionTypes: [],
cacheOptions: {
possibleTypes: {},
},
});

@@ -27,0 +29,0 @@ ```

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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