This document is a work-in-progress exploration of how the "oneOf" solution to input polymorphism might work within a GraphQL schema.
For the examples below, we'll be using the following shared types using existing GraphQL syntax:
| #!/usr/bin/env bash | |
| set -eu | |
| dockerfile=$(mktemp) | |
| trap "rm $dockerfile" EXIT | |
| cat << EOF > $dockerfile | |
| FROM ubuntu:bionic | |
| RUN apt-get update && apt-get install -y wget gnupg2 |
| const { | |
| isFetchingEnd, | |
| isFetchingTop, | |
| onRefresh, | |
| onEndReached, | |
| } = useRelayPagination(relay, users); | |
| const isRefreshing = isFetchingEnd || isFetchingTop; | |
| <FlatList |
| const path = require('path'); | |
| const getWorkspaces = require('get-yarn-workspaces'); | |
| const blacklist = require('metro-config/src/defaults/blacklist'); | |
| const workspaces = getWorkspaces(__dirname); | |
| module.exports = { | |
| projectRoot: path.resolve(__dirname, 'packages/app'), |
Tested with Apache Spark 2.1.0, Python 2.7.13 and Java 1.8.0_112
For older versions of Spark and ipython, please, see also previous version of text.
| package org.iainhull.akka | |
| import scala.concurrent.duration._ | |
| import akka.actor._ | |
| import akka.event.Logging | |
| import akka.pattern.ask | |
| import akka.util.Timeout | |
| import akka.persistence.{PersistentView, AtLeastOnceDelivery, PersistentActor} |
| using Castle.Core; | |
| using Castle.MicroKernel; | |
| using Castle.MicroKernel.ModelBuilder.Descriptors; | |
| using Castle.MicroKernel.Registration; | |
| using Castle.MicroKernel.SubSystems.Configuration; | |
| using Castle.Windsor; | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; |
| cloud: | |
| azure: | |
| keystore: FULLPATH-TO-YOUR-KEYSTORE | |
| password: YOUR-PASSWORD | |
| subscription_id: YOUR-AZURE-SUBSCRIPTION-ID | |
| service_name: YOUR-AZURE-SERVICE-NAME | |
| discovery: | |
| type: azure |
| angular.module('stateMock',[]); | |
| angular.module('stateMock').service("$state", function($q){ | |
| this.expectedTransitions = []; | |
| this.transitionTo = function(stateName){ | |
| if(this.expectedTransitions.length > 0){ | |
| var expectedState = this.expectedTransitions.shift(); | |
| if(expectedState !== stateName){ | |
| throw Error("Expected transition to state: " + expectedState + " but transitioned to " + stateName ); | |
| } | |
| }else{ |
| # delete old index if exists | |
| curl -XDELETE 'http://localhost:9200/syns?pretty' | |
| # create index with synonym analyzer and mapping | |
| curl -XPUT 'http://localhost:9200/syns?pretty' -d '{ | |
| "settings" : { | |
| "number_of_replicas": 0, | |
| "number_of_shards": 1, | |
| "index": { | |
| "analysis": { |