diff --git a/graphql_parser/lib/src/language/parser.dart b/graphql_parser/lib/src/language/parser.dart index 70da8eb7..0e894c55 100644 --- a/graphql_parser/lib/src/language/parser.dart +++ b/graphql_parser/lib/src/language/parser.dart @@ -547,6 +547,7 @@ class Parser { var field = parseObjectField(); while (field != null) { + fields.add(field); lastSpan = field.span; eatCommas(); field = parseObjectField(); diff --git a/graphql_server/lib/graphql_server.dart b/graphql_server/lib/graphql_server.dart index 41ec0db3..206da67b 100644 --- a/graphql_server/lib/graphql_server.dart +++ b/graphql_server/lib/graphql_server.dart @@ -104,8 +104,8 @@ class GraphQL { initialValue, Map globalVariables}) async { var operation = getOperation(document, operationName); - var coercedVariableValues = - coerceVariableValues(schema, operation, variableValues ?? {}); + var coercedVariableValues = coerceVariableValues( + schema, operation, variableValues ?? {}); if (operation.isQuery) return await executeQuery(document, operation, schema, coercedVariableValues, initialValue, globalVariables); @@ -282,6 +282,7 @@ class GraphQL { var argumentName = argumentDefinition.name; var argumentType = argumentDefinition.type; var defaultValue = argumentDefinition.defaultValue; + var value = argumentValues.firstWhere((a) => a.name == argumentName, orElse: () => null); @@ -480,10 +481,7 @@ class GraphQL { errors .addAll(validation.errors.map((m) => new GraphQLExceptionError(m))); - } catch (_, st) { - print('Um... $_'); - print(st); - } + } catch (_) {} } errors.insert(