private EventDescription CreateEvent(IExecutionContext executionContext) { IReadOnlyCollection <FieldSelection> selections = executionContext .CollectFields( executionContext.OperationType, executionContext.Operation.SelectionSet); if (selections.Count == 1) { FieldSelection selection = selections.Single(); var argumentResolver = new ArgumentResolver(); Dictionary <string, ArgumentValue> argumentValues = argumentResolver.CoerceArgumentValues( selection, executionContext.Variables); List <ArgumentNode> arguments = new List <ArgumentNode>(); foreach (var argumentValue in argumentValues) { IInputType argumentType = argumentValue.Value.Type; object value = argumentValue.Value.Value; arguments.Add(new ArgumentNode( argumentValue.Key, argumentType.ParseValue(value))); } return(new EventDescription(selection.Field.Name, arguments)); } else { // TODO : Error message throw new QueryException(); } }