Skip to content

Instantly share code, notes, and snippets.

View tomitrescak's full-sized avatar
🏠
Working from home

Tomas Trescak tomitrescak

🏠
Working from home
View GitHub Profile
vite:hmr [file change] src/modules/ei/ei_layout.tsx +39s
7:28:42 pm [vite] page reload src/modules/ei/ei_layout.tsx
vite:resolve 3.32ms /ei/din/roles?ei=din -> null +38s
vite:spa-fallback Rewriting GET /ei/din/roles?ei=din to /index.html +41s
vite:time 14.49ms /index.html +38s
vite:cache [304] /@vite/client +39s
vite:time 2.04ms /@vite/client +38ms
vite:load 0.91ms [fs] /src/index.ts +39s
vite:import-analysis 20.68ms [3 imports rewritten] src\index.ts +39s
vite:transform 23.01ms /src/index.ts +39s
{
"$type": "bpmn:Definitions",
"id": "Definitions_1akzsyb",
"targetNamespace": "http://bpmn.io/schema/bpmn",
"exporter": "Camunda Modeler",
"exporterVersion": "2.2.4",
"rootElements": [
{
"$type": "bpmn:Collaboration",
"id": "Collaboration_0y95kdl",
@tomitrescak
tomitrescak / graphql.tsx
Created December 18, 2018 01:13
graphql.schema.json
{
"__schema": {
"queryType": { "name": "Query" },
"mutationType": { "name": "Mutation" },
"subscriptionType": null,
"types": [
{
"kind": "OBJECT",
"name": "Query",
"description": "",
import { IObservableArray, toJS } from 'mobx';
import { types } from 'mobx-state-tree';
import { UndoManager } from 'mst-middlewares';
import { QueryTypes } from 'data/client';
import { DataDescriptor, DataSet } from './form_model';
export type IValidator = (input: string) => string;
export type IFormStore = typeof FormStore.Type;
// file: utils.ts
import { GraphQLResolveInfo } from 'graphql';
import { Mutation as ApiMutation, Query as ApiQuery } from './generated/api';
import { Prisma } from './generated/prisma';
import * as Types from './types; // you can omit this
export type FirstArgument<T> = T extends (arg1: infer U, …args: any[]) => any ? U : any;
export type Remapped<T> = {
 [P in keyof T]: (
 parent: null | undefined,
 args: FirstArgument<T[P]>,
import { Query } from './utils';
export const query: Query = {
 // hit cmd+space here and hear "who let the dogs out!"
}
import * as Types from './types';
export type Resolver<T> = {
 [U in keyof Partial<typeof Types>]: {
 [P in keyof Partial<T>]: (parent: T, args: any, ctx: Context, info: GraphQLResolveInfo) => any
 }
};
export type Resolver<T, U = any> = {
 [index: string]: { // this is a problem
 [P in keyof Partial<T>]: (parent: T, args: U, ctx: Context, info: GraphQLResolveInfo) => any
 }
};
import { GraphQLResolveInfo } from 'graphql';
import { Mutation as ApiMutation, Query as ApiQuery } from './generated/api';
import { Prisma } from './generated/prisma';
export interface Context {
 db: Prisma;
 request: any;
}
export type FirstArgument<T> = T extends (arg1: infer U, …args: any[]) => any ? U : any;
export type Remapped<T> = {
 [P in keyof T]: (
export type Remapped<T> = {
 [P in keyof T]: (
 parent: null | undefined,
 args: FirstArgument<T[P]>,
 ctx: Context,
 info?: GraphQLResolveInfo
 ) => any
};