@klevn/gql-client
Advanced tools
Comparing version 1.0.0 to 1.0.1
import fetch, {HeadersInit} from "node-fetch" | ||
interface Connection { | ||
export interface Connection { | ||
url: string, | ||
@@ -8,3 +8,3 @@ headers?: HeadersInit | ||
class GqlClient { | ||
export default class GqlClient { | ||
constructor(public connection:Connection, public GQL:string) { | ||
@@ -34,28 +34,2 @@ | ||
} | ||
} | ||
const GQL = ` | ||
query hello($pass: String!){ | ||
todoHistoryByPassword(password: $pass) { | ||
_id | ||
} | ||
} | ||
query world($pass: String!){ | ||
todoHistoryByPassword(password: $pass) { | ||
_id | ||
} | ||
} | ||
` | ||
const gql = new GqlClient({ | ||
url: "https://graphql.eu.fauna.com/graphql", | ||
headers: { | ||
"authorization": "Basic Zm5BRTJBY1dnZEFBMEdvaFQ4U0ZZdW9ROXRERUZPWVhCU1pfSzdVODp0b2RvLWRhaWx5OmFkbWlu" | ||
} | ||
}, GQL) | ||
gql.run("world", { | ||
pass: "hello" | ||
}).then(console.log) | ||
} |
@@ -9,3 +9,3 @@ { | ||
"name": "@klevn/gql-client", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"main": "gql-client.ts", | ||
@@ -12,0 +12,0 @@ "keywords": [], |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
1655
3
1
28
24