Skip to content

Instantly share code, notes, and snippets.

View dacz's full-sized avatar

David Cizek dacz

View GitHub Profile
@dacz
dacz / empty yaml schema
Created February 6, 2023 21:46
to overcome not working github workflow schame
{}
@dacz
dacz / main.go
Created May 13, 2020 08:40
actor model in go
package main
import (
"fmt"
"sync"
)
type Runner struct {
taskchan chan func() // channel for work serialization
val string // some internal state (which we want to access for RW)

Keybase proof

I hereby claim:

  • I am dacz on github.
  • I am dacz (https://keybase.io/dacz) on keybase.
  • I have a public key ASD1M50QE_RPgoJ3qNg7c9gZMxuv1iGdwvB9sfDXgR8tgAo

To claim this, I am signing this object:

// rest.js
import DataLoader from 'dataloader';
import { REST_URL } from './links';
import fetcher from './fetcher';
// ---- DATA LOADERS
export const dataLoadersFactory = ctx => ({
dataLoaders: {
// resolvers.js
import rest from './rest';
export default {
Query: {
post: (...args) => rest.getPost(...args),
posts: (...args) => rest.getPosts(...args),
user: (...args) => rest.getUser(...args),
users: (...args) => rest.getUsers(...args),
@dacz
dacz / apolloClient.js
Created December 1, 2017 15:07
apollo-bridge-link ... to article on Medium
// apolloClient.js
import { ApolloClient } from 'apollo-client';
import { InMemoryCache } from 'apollo-cache-inmemory'; // eslint-disable-line import/no-unresolved
import { createBridgeLink } from 'apollo-bridge-link';
import { dataLoadersFactory } from './rest';
import resolvers from './resolvers';
import schema from './schemaPlain';
import { setContext } from 'apollo-link-context';
import { ApolloClient } from 'apollo-client';
import { InMemoryCache } from 'apollo-cache-inmemory';
import { createBridgeLink } from 'apollo-bridge-link';
import { dataLoadersFactory } from './rest';
import { mergeDeepRight } from 'ramda';
import resolvers from './resolvers';
import schema from './schemaPlain';
import { setContext } from 'apollo-link-context';
const mock = true;
// schemaPlain.js
export default `
type Post {
id: ID!
title: String
content: String
author: User
}
// queries.graphql.js
import gql from 'graphql-tag';
const USER_FRAGMENT = gql`
fragment userFragment on User {
id
username
email
}

Feature: Add customer to PE dashboard

As an PE administrator I'm able to add new user to the PE dashboard and give her access to specific project.

Given:

  • I'm PE administrator and I'm logged in to PE system.
  • I have email address of the customer to be added

Steps:

  1. I select "new user" action