From 6e8189fc6ebf670f488f0799ebf601ab090da531 Mon Sep 17 00:00:00 2001 From: Tobe O Date: Thu, 2 Aug 2018 09:25:41 -0400 Subject: [PATCH] Fix Dart 1 error --- .../lib/src/language/ast/alias.dart | 6 +- .../lib/src/language/ast/argument.dart | 3 - .../lib/src/language/ast/array_value.dart | 12 -- .../lib/src/language/ast/boolean_value.dart | 3 - .../lib/src/language/ast/default_value.dart | 3 - .../lib/src/language/ast/directive.dart | 10 -- .../lib/src/language/ast/document.dart | 6 - .../lib/src/language/ast/field.dart | 3 - .../lib/src/language/ast/field_name.dart | 3 - .../src/language/ast/fragment_definition.dart | 7 - .../lib/src/language/ast/fragment_spread.dart | 5 - .../lib/src/language/ast/inline_fragment.dart | 6 - .../lib/src/language/ast/list_type.dart | 3 - graphql_parser/lib/src/language/ast/node.dart | 5 - .../lib/src/language/ast/number_value.dart | 3 - .../language/ast/operation_definition.dart | 8 - .../lib/src/language/ast/selection.dart | 6 - .../lib/src/language/ast/selection_set.dart | 12 -- .../lib/src/language/ast/string_value.dart | 3 - graphql_parser/lib/src/language/ast/type.dart | 15 -- .../lib/src/language/ast/type_condition.dart | 3 - .../lib/src/language/ast/type_name.dart | 3 - .../src/language/ast/value_or_variable.dart | 3 - .../lib/src/language/ast/variable.dart | 3 - .../src/language/ast/variable_definition.dart | 4 - .../language/ast/variable_definitions.dart | 13 -- graphql_parser/lib/src/language/lexer.dart | 2 +- graphql_parser/test/argument_test.dart | 2 +- graphql_parser/test/common.dart | 3 +- graphql_parser/test/document_test.dart | 5 +- graphql_server/graphql_server.iml | 6 +- graphql_server/lib/src/query_executor.dart | 144 ++++++++++++++++++ graphql_server/pubspec.yaml | 5 + travis.sh | 2 +- 34 files changed, 163 insertions(+), 157 deletions(-) create mode 100644 graphql_server/lib/src/query_executor.dart create mode 100644 graphql_server/pubspec.yaml diff --git a/graphql_parser/lib/src/language/ast/alias.dart b/graphql_parser/lib/src/language/ast/alias.dart index 9517cf15..986b4370 100644 --- a/graphql_parser/lib/src/language/ast/alias.dart +++ b/graphql_parser/lib/src/language/ast/alias.dart @@ -1,6 +1,7 @@ +import 'package:source_span/source_span.dart'; + import '../token.dart'; import 'node.dart'; -import 'package:source_span/source_span.dart'; class AliasContext extends Node { final Token NAME1, COLON, NAME2; @@ -15,7 +16,4 @@ class AliasContext extends Node { @override FileSpan get span => NAME1.span.expand(COLON.span).expand(NAME2.span); - - @override - String toSource() => '${NAME1.text}:${NAME2.text}'; } diff --git a/graphql_parser/lib/src/language/ast/argument.dart b/graphql_parser/lib/src/language/ast/argument.dart index f2b56c86..3a85a067 100644 --- a/graphql_parser/lib/src/language/ast/argument.dart +++ b/graphql_parser/lib/src/language/ast/argument.dart @@ -14,7 +14,4 @@ class ArgumentContext extends Node { @override FileSpan get span => NAME.span.expand(COLON.span).expand(valueOrVariable.span); - - @override - String toSource() => '${NAME.text}:${valueOrVariable.toSource()}'; } diff --git a/graphql_parser/lib/src/language/ast/array_value.dart b/graphql_parser/lib/src/language/ast/array_value.dart index 8fe28e72..8b9ade2b 100644 --- a/graphql_parser/lib/src/language/ast/array_value.dart +++ b/graphql_parser/lib/src/language/ast/array_value.dart @@ -16,16 +16,4 @@ class ArrayValueContext extends ValueContext { @override List get value => values.map((v) => v.value).toList(); - - @override - String toSource() { - var buf = new StringBuffer('['); - - for (int i = 0; i < values.length; i++) { - if (i > 0) buf.write(','); - buf.write(values[i].toSource()); - } - - return buf.toString() + ']'; - } } diff --git a/graphql_parser/lib/src/language/ast/boolean_value.dart b/graphql_parser/lib/src/language/ast/boolean_value.dart index 5b6e75b8..b99fb9e9 100644 --- a/graphql_parser/lib/src/language/ast/boolean_value.dart +++ b/graphql_parser/lib/src/language/ast/boolean_value.dart @@ -17,7 +17,4 @@ class BooleanValueContext extends ValueContext { @override FileSpan get span => BOOLEAN.span; - - @override - String toSource() => BOOLEAN.text; } diff --git a/graphql_parser/lib/src/language/ast/default_value.dart b/graphql_parser/lib/src/language/ast/default_value.dart index 3519db53..3395a688 100644 --- a/graphql_parser/lib/src/language/ast/default_value.dart +++ b/graphql_parser/lib/src/language/ast/default_value.dart @@ -11,7 +11,4 @@ class DefaultValueContext extends Node { @override FileSpan get span => EQUALS.span.expand(value.span); - - @override - String toSource() => '=${value.toSource()}'; } diff --git a/graphql_parser/lib/src/language/ast/directive.dart b/graphql_parser/lib/src/language/ast/directive.dart index a86179fc..a9f172a0 100644 --- a/graphql_parser/lib/src/language/ast/directive.dart +++ b/graphql_parser/lib/src/language/ast/directive.dart @@ -26,14 +26,4 @@ class DirectiveContext extends Node { return out; } - - @override - String toSource() { - if (valueOrVariable != null) - return '@${NAME.text}:${valueOrVariable.toSource()}'; - else if (argument != null) - return '@${NAME.text}(${argument.toSource()})'; - else - return '@${NAME.text}'; - } } diff --git a/graphql_parser/lib/src/language/ast/document.dart b/graphql_parser/lib/src/language/ast/document.dart index 526911dd..d705e0d6 100644 --- a/graphql_parser/lib/src/language/ast/document.dart +++ b/graphql_parser/lib/src/language/ast/document.dart @@ -12,10 +12,4 @@ class DocumentContext extends Node { .map((d) => d.span) .reduce((a, b) => a.expand(b)); } - - @override - String toSource() { - if (definitions.isEmpty) return '(empty document)'; - return definitions.map((d) => d.toSource()).join(); - } } diff --git a/graphql_parser/lib/src/language/ast/field.dart b/graphql_parser/lib/src/language/ast/field.dart index e035e58a..3ac2c965 100644 --- a/graphql_parser/lib/src/language/ast/field.dart +++ b/graphql_parser/lib/src/language/ast/field.dart @@ -26,7 +26,4 @@ class FieldContext extends Node { else return fieldName.span; } - - @override - String toSource() => span.text; } diff --git a/graphql_parser/lib/src/language/ast/field_name.dart b/graphql_parser/lib/src/language/ast/field_name.dart index 87083a2f..d6e80dea 100644 --- a/graphql_parser/lib/src/language/ast/field_name.dart +++ b/graphql_parser/lib/src/language/ast/field_name.dart @@ -15,7 +15,4 @@ class FieldNameContext extends Node { @override FileSpan get span => alias?.span ?? NAME.span; - - @override - String toSource() => alias?.toSource() ?? NAME.text; } diff --git a/graphql_parser/lib/src/language/ast/fragment_definition.dart b/graphql_parser/lib/src/language/ast/fragment_definition.dart index 530efdcc..0fb9892a 100644 --- a/graphql_parser/lib/src/language/ast/fragment_definition.dart +++ b/graphql_parser/lib/src/language/ast/fragment_definition.dart @@ -25,11 +25,4 @@ class FragmentDefinitionContext extends DefinitionContext { out = directives.fold(out, (o, d) => o.expand(d.span)); return out.expand(selectionSet.span); } - - @override - String toSource() => - 'fragment ${NAME.text} on ' + - typeCondition.toSource() + - directives.map((d) => d.toSource()).join() + - selectionSet.toSource(); } diff --git a/graphql_parser/lib/src/language/ast/fragment_spread.dart b/graphql_parser/lib/src/language/ast/fragment_spread.dart index 69aa0e5e..dcac0070 100644 --- a/graphql_parser/lib/src/language/ast/fragment_spread.dart +++ b/graphql_parser/lib/src/language/ast/fragment_spread.dart @@ -17,9 +17,4 @@ class FragmentSpreadContext extends Node { if (directives.isEmpty) return out; return directives.fold(out, (o, d) => o.expand(d.span)); } - - @override - String toSource() { - return '...${NAME.text}' + directives.map((d) => d.toSource()).join(); - } } diff --git a/graphql_parser/lib/src/language/ast/inline_fragment.dart b/graphql_parser/lib/src/language/ast/inline_fragment.dart index a9ad43a2..7f616bc5 100644 --- a/graphql_parser/lib/src/language/ast/inline_fragment.dart +++ b/graphql_parser/lib/src/language/ast/inline_fragment.dart @@ -20,10 +20,4 @@ class InlineFragmentContext extends Node { out = directives.fold(out, (o, d) => o.expand(d.span)); return out.expand(selectionSet.span); } - - @override - String toSource() => - '...on${typeCondition.toSource()}' + - directives.map((d) => d.toSource()).join() + - selectionSet.toSource(); } diff --git a/graphql_parser/lib/src/language/ast/list_type.dart b/graphql_parser/lib/src/language/ast/list_type.dart index a5697a22..ea8ef20c 100644 --- a/graphql_parser/lib/src/language/ast/list_type.dart +++ b/graphql_parser/lib/src/language/ast/list_type.dart @@ -11,7 +11,4 @@ class ListTypeContext extends Node { @override FileSpan get span => LBRACKET.span.expand(type.span).expand(RBRACKET.span); - - @override - String toSource() => '[${type.toSource()}]'; } diff --git a/graphql_parser/lib/src/language/ast/node.dart b/graphql_parser/lib/src/language/ast/node.dart index aa6aacbd..a3ed0db8 100644 --- a/graphql_parser/lib/src/language/ast/node.dart +++ b/graphql_parser/lib/src/language/ast/node.dart @@ -2,9 +2,4 @@ import 'package:source_span/source_span.dart'; abstract class Node { FileSpan get span; - - SourceLocation get start => span.start; - SourceLocation get end => span.end; - - String toSource(); } diff --git a/graphql_parser/lib/src/language/ast/number_value.dart b/graphql_parser/lib/src/language/ast/number_value.dart index 21247606..e910c6c4 100644 --- a/graphql_parser/lib/src/language/ast/number_value.dart +++ b/graphql_parser/lib/src/language/ast/number_value.dart @@ -25,7 +25,4 @@ class NumberValueContext extends ValueContext { @override FileSpan get span => NUMBER.span; - - @override - String toSource() => NUMBER.text; } diff --git a/graphql_parser/lib/src/language/ast/operation_definition.dart b/graphql_parser/lib/src/language/ast/operation_definition.dart index 5333c5e6..3246e173 100644 --- a/graphql_parser/lib/src/language/ast/operation_definition.dart +++ b/graphql_parser/lib/src/language/ast/operation_definition.dart @@ -28,12 +28,4 @@ class OperationDefinitionContext extends DefinitionContext { out = directives.fold(out, (o, d) => o.expand(d.span)); return out.expand(selectionSet.span); } - - @override - String toSource() { - if (TYPE == null) return selectionSet.toSource(); - return '${TYPE.text} ${NAME.text} ${variableDefinitions.toSource()} ' + - directives.map((d) => d.toSource()).join() + - ' ${selectionSet.toSource()}'; - } } diff --git a/graphql_parser/lib/src/language/ast/selection.dart b/graphql_parser/lib/src/language/ast/selection.dart index e573bb9f..988ab1c7 100644 --- a/graphql_parser/lib/src/language/ast/selection.dart +++ b/graphql_parser/lib/src/language/ast/selection.dart @@ -16,10 +16,4 @@ class SelectionContext extends Node { @override FileSpan get span => field?.span ?? fragmentSpread?.span ?? inlineFragment?.span; - - @override - String toSource() => - field?.toSource() ?? - fragmentSpread?.toSource() ?? - inlineFragment?.toSource(); } diff --git a/graphql_parser/lib/src/language/ast/selection_set.dart b/graphql_parser/lib/src/language/ast/selection_set.dart index 0ce60570..3f83ffcf 100644 --- a/graphql_parser/lib/src/language/ast/selection_set.dart +++ b/graphql_parser/lib/src/language/ast/selection_set.dart @@ -15,16 +15,4 @@ class SelectionSetContext extends Node { selections.fold(LBRACE.span, (out, s) => out.expand(s.span)); return out.expand(RBRACE.span); } - - @override - String toSource() { - var buf = new StringBuffer('{'); - - for (int i = 0; i < selections.length; i++) { - if (i > 0) buf.write(','); - buf.write(selections[i].toSource()); - } - - return buf.toString() + '}'; - } } diff --git a/graphql_parser/lib/src/language/ast/string_value.dart b/graphql_parser/lib/src/language/ast/string_value.dart index d10a4664..db96fe05 100644 --- a/graphql_parser/lib/src/language/ast/string_value.dart +++ b/graphql_parser/lib/src/language/ast/string_value.dart @@ -67,7 +67,4 @@ class StringValueContext extends ValueContext { @override get value => stringValue; - - @override - String toSource() => STRING.text; } diff --git a/graphql_parser/lib/src/language/ast/type.dart b/graphql_parser/lib/src/language/ast/type.dart index 8adadadf..48b4bcda 100644 --- a/graphql_parser/lib/src/language/ast/type.dart +++ b/graphql_parser/lib/src/language/ast/type.dart @@ -20,19 +20,4 @@ class TypeContext extends Node { var out = typeName?.span ?? listType.span; return EXCLAMATION != null ? out.expand(EXCLAMATION.span) : out; } - - @override - String toSource() { - var buf = new StringBuffer(); - - if (typeName != null) { - buf.write(typeName.toSource()); - } else if (listType != null) { - buf.write(listType.toSource()); - } - - if (!isNullable) buf.write('!'); - - return buf.toString(); - } } diff --git a/graphql_parser/lib/src/language/ast/type_condition.dart b/graphql_parser/lib/src/language/ast/type_condition.dart index c555b534..2600fc44 100644 --- a/graphql_parser/lib/src/language/ast/type_condition.dart +++ b/graphql_parser/lib/src/language/ast/type_condition.dart @@ -9,7 +9,4 @@ class TypeConditionContext extends Node { @override FileSpan get span => typeName.span; - - @override - String toSource() => typeName.toSource(); } diff --git a/graphql_parser/lib/src/language/ast/type_name.dart b/graphql_parser/lib/src/language/ast/type_name.dart index 7ee3906c..d7d9675a 100644 --- a/graphql_parser/lib/src/language/ast/type_name.dart +++ b/graphql_parser/lib/src/language/ast/type_name.dart @@ -11,7 +11,4 @@ class TypeNameContext extends Node { FileSpan get span => NAME.span; TypeNameContext(this.NAME); - - @override - String toSource() => NAME.text; } diff --git a/graphql_parser/lib/src/language/ast/value_or_variable.dart b/graphql_parser/lib/src/language/ast/value_or_variable.dart index 3cd64c5d..7b28b1e4 100644 --- a/graphql_parser/lib/src/language/ast/value_or_variable.dart +++ b/graphql_parser/lib/src/language/ast/value_or_variable.dart @@ -13,7 +13,4 @@ class ValueOrVariableContext extends Node { @override FileSpan get span => value?.span ?? variable.span; - - @override - String toSource() => '${value?.toSource() ?? variable.toSource()}'; } diff --git a/graphql_parser/lib/src/language/ast/variable.dart b/graphql_parser/lib/src/language/ast/variable.dart index a87476c3..71e7ab56 100644 --- a/graphql_parser/lib/src/language/ast/variable.dart +++ b/graphql_parser/lib/src/language/ast/variable.dart @@ -12,7 +12,4 @@ class VariableContext extends Node { @override FileSpan get span => DOLLAR.span.expand(NAME.span); // new FileSpan(DOLLAR?.span?.start, NAME?.span?.end, toSource()); - - @override - String toSource() => '\$${NAME.text}'; } diff --git a/graphql_parser/lib/src/language/ast/variable_definition.dart b/graphql_parser/lib/src/language/ast/variable_definition.dart index f03afba9..9585bfd1 100644 --- a/graphql_parser/lib/src/language/ast/variable_definition.dart +++ b/graphql_parser/lib/src/language/ast/variable_definition.dart @@ -16,8 +16,4 @@ class VariableDefinitionContext extends Node { @override FileSpan get span => variable.span.expand(defaultValue?.span ?? type.span); - - @override - String toSource() => - '${variable.toSource()}:${type.toSource()}${defaultValue?.toSource() ?? ""}'; } diff --git a/graphql_parser/lib/src/language/ast/variable_definitions.dart b/graphql_parser/lib/src/language/ast/variable_definitions.dart index 81f3113e..852ee94e 100644 --- a/graphql_parser/lib/src/language/ast/variable_definitions.dart +++ b/graphql_parser/lib/src/language/ast/variable_definitions.dart @@ -15,17 +15,4 @@ class VariableDefinitionsContext extends Node { LPAREN.span, (o, v) => o.expand(v.span)); return out.expand(RPAREN.span); } - - @override - String toSource() { - var buf = new StringBuffer('('); - - for (int i = 0; i < variableDefinitions.length; i++) { - if (i > 0) buf.write(','); - buf.write(variableDefinitions[i].toSource()); - } - - buf.write(')'); - return buf.toString(); - } } diff --git a/graphql_parser/lib/src/language/lexer.dart b/graphql_parser/lib/src/language/lexer.dart index e74ecdd0..02309395 100644 --- a/graphql_parser/lib/src/language/lexer.dart +++ b/graphql_parser/lib/src/language/lexer.dart @@ -3,7 +3,7 @@ import 'syntax_error.dart'; import 'token.dart'; import 'token_type.dart'; -final RegExp _comment = RegExp(r'#[^\n]*'); +final RegExp _comment = new RegExp(r'#[^\n]*'); final RegExp _whitespace = new RegExp('[ \t\n\r]+'); final RegExp _boolean = new RegExp(r'true|false'); final RegExp _number = new RegExp(r'-?[0-9]+(\.[0-9]+)?(E|e(\+|-)?[0-9]+)?'); diff --git a/graphql_parser/test/argument_test.dart b/graphql_parser/test/argument_test.dart index 98e0b75c..6de26e5c 100644 --- a/graphql_parser/test/argument_test.dart +++ b/graphql_parser/test/argument_test.dart @@ -39,7 +39,7 @@ class _IsArgument extends Matcher { bool matches(item, Map matchState) { var arg = item is ArgumentContext ? item : parseArgument(item.toString()); if (arg == null) return false; - print(arg.toSource()); + print(arg.span.highlight()); return equals(name).matches(arg.name, matchState) && equals(value).matches( arg.valueOrVariable.value?.value ?? diff --git a/graphql_parser/test/common.dart b/graphql_parser/test/common.dart index f0f028e3..5551d83f 100644 --- a/graphql_parser/test/common.dart +++ b/graphql_parser/test/common.dart @@ -4,4 +4,5 @@ import 'package:test/test.dart'; Parser parse(String text) => new Parser(scan(text)); -final Matcher throwsSyntaxError = throwsA(const isInstanceOf()); +final Matcher throwsSyntaxError = + throwsA(predicate((x) => x is SyntaxError, 'is a syntax error')); diff --git a/graphql_parser/test/document_test.dart b/graphql_parser/test/document_test.dart index d2c1f9b7..3986808f 100644 --- a/graphql_parser/test/document_test.dart +++ b/graphql_parser/test/document_test.dart @@ -63,10 +63,9 @@ main() { var doc = parse(r'query foo ($one: [int] = 2) @foo @bar: 2 {foo, bar: baz}') .parseDocument(); - print(doc.toSource()); + print(doc.span.highlight()); expect(doc.definitions, hasLength(1)); - expect(doc.definitions.first, - const isInstanceOf()); + expect(doc.definitions.first is OperationDefinitionContext, isTrue); var op = doc.definitions.first as OperationDefinitionContext; expect(op.isMutation, isFalse); expect(op.isQuery, isTrue); diff --git a/graphql_server/graphql_server.iml b/graphql_server/graphql_server.iml index ba9c74b6..0854fb6e 100644 --- a/graphql_server/graphql_server.iml +++ b/graphql_server/graphql_server.iml @@ -2,7 +2,11 @@ - + + + + + diff --git a/graphql_server/lib/src/query_executor.dart b/graphql_server/lib/src/query_executor.dart new file mode 100644 index 00000000..b2090b6d --- /dev/null +++ b/graphql_server/lib/src/query_executor.dart @@ -0,0 +1,144 @@ +import 'package:graphql_parser/graphql_parser.dart'; +import 'package:symbol_table/symbol_table.dart'; + +class GraphQLQueryExecutor { + const GraphQLQueryExecutor(); + + Map visitDocument(DocumentContext ctx, Map inputData) { + var scope = new SymbolTable(); + return ctx.definitions.fold(inputData, (o, def) { + var result = visitDefinition(def, o, scope); + return result ?? o; + }); + } + + Map visitDefinition( + DefinitionContext ctx, inputData, SymbolTable scope) { + if (ctx is OperationDefinitionContext) + return visitOperationDefinition(ctx, inputData, scope); + else if (ctx is FragmentDefinitionContext) + return visitFragmentDefinition(ctx, inputData, scope); + else + throw new UnsupportedError('Unsupported definition: $ctx'); + } + + Map visitOperationDefinition( + OperationDefinitionContext ctx, inputData, SymbolTable scope) { + // Add variable definitions + ctx.variableDefinitions?.variableDefinitions?.forEach((def) { + scope.assign(def.variable.name, def.defaultValue?.value?.value); + }); + + callback(o, SelectionContext sel) { + var result = visitSelection(sel, o, scope); + return result ?? o; + } + + if (inputData is List) { + return { + 'data': inputData.map((x) { + return ctx.selectionSet.selections.fold(x, callback); + }).toList() + }; + } else if (inputData is Map) { + return {'data': ctx.selectionSet.selections.fold(inputData, callback)}; + } else + throw new UnsupportedError( + 'Cannot execute GraphQL queries against $inputData.'); + } + + Map visitFragmentDefinition( + FragmentDefinitionContext ctx, inputData, SymbolTable scope) {} + + visitSelection(SelectionContext ctx, inputData, SymbolTable scope) { + if (inputData is! Map && inputData is! List) + return inputData; + else if (inputData is List) + return inputData.map((x) => visitSelection(ctx, x, scope)).toList(); + + if (ctx.field != null) + return visitField(ctx.field, inputData, scope); + // TODO: Spread, inline fragment + else + throw new UnsupportedError('Unsupported selection: $ctx'); + } + + visitField(FieldContext ctx, inputData, SymbolTable scope, [value]) { + bool hasValue = value != null; + var s = scope.createChild(); + Map out = {}; + + value ??= inputData[ctx.fieldName.name]; + + // Apply arguments to query lists... + if (ctx.arguments.isNotEmpty) { + var listSearch = value is List ? value : inputData; + + if (listSearch is! List) + throw new UnsupportedError('Arguments are only supported on Lists.'); + value = listSearch.firstWhere((x) { + if (x is! Map) + return null; + else { + return ctx.arguments.every((a) { + var value; + + if (a.valueOrVariable.value != null) + value = a.valueOrVariable.value.value; + else { + // TODO: Unknown key + value = scope.resolve(a.valueOrVariable.variable.name).value; + } + + // print('Looking for ${a.name} == $value in $x'); + return x[a.name] == value; + }); + } + }, orElse: () => null); + } + + if (value == null) { + //print('Why is ${ctx.fieldName.name} null in $inputData??? hasValue: $hasValue'); + return value; + } + + if (ctx.selectionSet == null) return value; + + var target = {}; + + for (var selection in ctx.selectionSet.selections) { + if (selection.field != null) { + // Get the corresponding data + var key = selection.field.fieldName.name; + var childValue = value[key]; + + if (childValue is! List && childValue is! Map) + target[key] = childValue; + else { + applyFieldSelection(x, [root]) { + //print('Select ${selection.field.fieldName.name} from $x'); + return visitField(selection.field, root ?? x, s, x); + } + + var output = childValue is List + ? childValue + .map((x) => applyFieldSelection(x, childValue)) + .toList() + : applyFieldSelection(childValue); + //print('$key => $output'); + target[key] = output; + } + } + // TODO: Spread, inline fragment + } + + // Set this as the value within the current scope... + if (hasValue) { + return target; + } else + out[ctx.fieldName.name] = target; + s.create(ctx.fieldName.name, value: target); + + return out; + } +} \ No newline at end of file diff --git a/graphql_server/pubspec.yaml b/graphql_server/pubspec.yaml new file mode 100644 index 00000000..d33078ce --- /dev/null +++ b/graphql_server/pubspec.yaml @@ -0,0 +1,5 @@ +name: graphql_server +dependencies: + graphql_parser: + path: ../graphql_parser + symbol_table: ^1.0.0 \ No newline at end of file diff --git a/travis.sh b/travis.sh index 05fac71d..b5c7c26e 100644 --- a/travis.sh +++ b/travis.sh @@ -1,2 +1,2 @@ #!/usr/bin/env bash -cd graphql_parser && pub get && pub run test -j2 && cd.. \ No newline at end of file +cd graphql_parser && pub get && pub run test -j2 && cd .. \ No newline at end of file