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

@prisma/engine-core

Package Overview
Dependencies
Maintainers
5
Versions
5964
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@prisma/engine-core - npm Package Compare versions

Comparing version 0.0.29 to 0.0.30

27

dist/BrowserEngine.d.ts

@@ -0,15 +1,15 @@

export declare type Fetcher = (input: {
query: string;
typeName?: string;
}) => Promise<{
data?: any;
error?: any;
errors?: any;
}>;
interface EngineConfig {
url?: string;
fetcher?: (query: string) => Promise<{
data?: any;
error?: any;
errors?: any;
}>;
fetcher?: Fetcher;
}
export declare class BrowserEngine {
fetcher: (query: string) => Promise<{
data?: any;
error?: any;
errors?: any;
}>;
fetcher: Fetcher;
url?: string;

@@ -19,4 +19,7 @@ constructor({ fetcher }: EngineConfig);

stop(): Promise<void>;
defaultFetcher: (query: string) => Promise<any>;
request<T>(query: string): Promise<T>;
defaultFetcher: ({ query, typeName }: {
query: string;
typeName?: string;
}) => Promise<any>;
request<T>(query: string, typeName?: string): Promise<T>;
handleErrors({ errors, query }: {

@@ -23,0 +26,0 @@ errors?: any;

@@ -6,3 +6,3 @@ "use strict";

constructor({ fetcher }) {
this.defaultFetcher = async (query) => {
this.defaultFetcher = async ({ query, typeName }) => {
return fetch(this.url, {

@@ -46,4 +46,4 @@ method: 'POST',

async stop() { }
async request(query) {
return this.fetcher(query).then(result => {
async request(query, typeName) {
return this.fetcher({ query, typeName }).then(result => {
const { data } = result;

@@ -50,0 +50,0 @@ const errors = result.error || result.errors;

{
"name": "@prisma/engine-core",
"version": "0.0.29",
"version": "0.0.30",
"license": "Apache-2.0",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

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