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

@contember/client-content

Package Overview
Dependencies
Maintainers
5
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@contember/client-content - npm Package Compare versions

Comparing version 1.3.0-alpha.5 to 1.3.0-alpha.6

8

dist/development/ContentClient.js

@@ -6,4 +6,4 @@ import { mutationFragments } from "./utils/mutationFragments.js";

class ContentClient {
constructor(executor) {
this.executor = executor;
constructor(client) {
this.client = client;
}

@@ -14,3 +14,3 @@ async query(queries, options) {

const { query, variables } = printer.printDocument("query", operationSet.selection, {});
const result = await this.executor(query, { variables, ...options });
const result = await this.client.execute(query, { variables, ...options });
return operationSet.parse(result);

@@ -22,3 +22,3 @@ }

const { query, variables } = printer.printDocument("mutation", operationSet.selection, mutationFragments);
const result = await this.executor(query, { variables, ...options });
const result = await this.client.execute(query, { variables, ...options });
return operationSet.parse(result);

@@ -25,0 +25,0 @@ }

@@ -6,4 +6,4 @@ import { mutationFragments } from "./utils/mutationFragments.js";

class ContentClient {
constructor(executor) {
this.executor = executor;
constructor(client) {
this.client = client;
}

@@ -14,3 +14,3 @@ async query(queries, options) {

const { query, variables } = printer.printDocument("query", operationSet.selection, {});
const result = await this.executor(query, { variables, ...options });
const result = await this.client.execute(query, { variables, ...options });
return operationSet.parse(result);

@@ -22,3 +22,3 @@ }

const { query, variables } = printer.printDocument("mutation", operationSet.selection, mutationFragments);
const result = await this.executor(query, { variables, ...options });
const result = await this.client.execute(query, { variables, ...options });
return operationSet.parse(result);

@@ -25,0 +25,0 @@ }

@@ -1,8 +0,7 @@

import { GraphQlClientRequestOptions } from '@contember/graphql-client';
import { GraphQlClient, GraphQlClientRequestOptions } from '@contember/graphql-client';
import { ContentMutation, ContentQuery } from './nodes';
export type QueryExecutorOptions = GraphQlClientRequestOptions;
export type QueryExecutor = <T = unknown>(query: string, options: GraphQlClientRequestOptions) => Promise<T>;
export declare class ContentClient {
private readonly executor;
constructor(executor: QueryExecutor);
private readonly client;
constructor(client: Pick<GraphQlClient, 'execute'>);
query<Value>(query: ContentQuery<Value>, options?: QueryExecutorOptions): Promise<Value>;

@@ -9,0 +8,0 @@ query<Values extends Record<string, any>>(queries: {

{
"name": "@contember/client-content",
"license": "Apache-2.0",
"version": "1.3.0-alpha.5",
"version": "1.3.0-alpha.6",
"main": "./dist/production/index.js",

@@ -38,4 +38,4 @@ "exports": {

"dependencies": {
"@contember/graphql-builder": "1.3.0-alpha.5",
"@contember/graphql-client": "1.3.0-alpha.5",
"@contember/graphql-builder": "1.3.0-alpha.6",
"@contember/graphql-client": "1.3.0-alpha.6",
"@contember/schema": "^1.3.6"

@@ -42,0 +42,0 @@ },

import { mutationFragments } from './utils/mutationFragments'
import { GraphQlClientRequestOptions } from '@contember/graphql-client'
import { GraphQlClient, GraphQlClientRequestOptions } from '@contember/graphql-client'
import { GraphQlQueryPrinter } from '@contember/graphql-builder'

@@ -9,9 +9,8 @@ import { ContentMutation, ContentQuery } from './nodes'

export type QueryExecutorOptions = GraphQlClientRequestOptions
export type QueryExecutorOptions =
& GraphQlClientRequestOptions
export type QueryExecutor = <T = unknown>(query: string, options: GraphQlClientRequestOptions) => Promise<T>
export class ContentClient {
constructor(
private readonly executor: QueryExecutor,
private readonly client: Pick<GraphQlClient, 'execute'>,
) {

@@ -27,3 +26,3 @@ }

const { query, variables } = printer.printDocument('query', operationSet.selection, {})
const result = await this.executor(query, { variables, ...options })
const result = await this.client.execute(query, { variables, ...options })
return operationSet.parse(result)

@@ -40,3 +39,3 @@ }

const { query, variables } = printer.printDocument('mutation', operationSet.selection, mutationFragments)
const result = await this.executor(query, { variables, ...options })
const result = await this.client.execute(query, { variables, ...options })

@@ -43,0 +42,0 @@ return operationSet.parse(result)

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

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