Skip to content

Instantly share code, notes, and snippets.

View MoritzGruber's full-sized avatar
🖐️
Hi there!

Moritz Gruber MoritzGruber

🖐️
Hi there!
View GitHub Profile
@MoritzGruber
MoritzGruber / main.py
Created September 25, 2023 15:55
python example how to query caisy with a graphql client
from gql import gql, Client
from gql.transport.aiohttp import AIOHTTPTransport
# Select your transport with a defined url endpoint
transport = AIOHTTPTransport(url="https://cloud.caisy.io/api/v3/e/593065a4-0e27-4c4b-b1e3-25e3fd3ebfb9/graphql",
headers={'x-caisy-apikey': '2GjbTs8uQAh4IblXQs8YAYrvboKXvi54'}
)
# Create a GraphQL client using the defined transport
client = Client(transport=transport, fetch_schema_from_transport=True)
@MoritzGruber
MoritzGruber / gql-generator.js
Created June 8, 2021 12:33
gql-generator fix max Maximum call stack size exceeded
#!/usr/bin/env node
const fs = require('fs');
const path = require('path');
const program = require('commander');
const { Source, buildSchema } = require('graphql');
const del = require('del');
program
.option('--schemaFilePath [value]', 'path of your graphql schema file')
.option('--destDirPath [value]', 'dir you want to store the generated queries')
var pg = require('pg');
var shimmer = require('shimmer');
function wrapQuery(orig, name) {
return function wrappedFunction(sql) {
console.time("PSQL: " +sql);
var args = arguments
var index = args.length - 1
@MoritzGruber
MoritzGruber / cloudSettings
Last active August 9, 2019 13:03 — forked from anonymous/pixijs-shaders.markdown
PixiJS Shaders
{"lastUpload":"2019-08-09T13:03:03.604Z","extensionVersion":"v3.4.1"}