示例#1
0
 public GraphQlMainValidation(IGraphQlDocument doc, __SchemaContainer schema) : base(doc, schema)
 {
     OperationNameUniqueness();
     LoneAnonymousOperation();
     FragmentNameUniqueness();
     FieldSelectionMatchFragments();
     OperationSelectionMatch();
     FieldSelectionMerging();
 }
示例#2
0
        public GraphQlMainExecution(IGraphQlDocument document, __SchemaContainer schema, IGraphQlOutput output, Object topLevelObject, string operationName, String vars)
            : base(document, schema)
        {
            this.TopLevelObject = topLevelObject;
            this.output         = output;

            GetTypeFunc = schema.GetType;

            var operation = GetTopLevelOperation(operationName);


            var variables = new Dictionary <string, Object>();

            // not parsed variables yet

            output.PushObject("data");

            ExecuteSelectionSet(new ModifiableSelectionSet(operation.selectionSet()), ExtractAppropriate__TypeForOperation(schema.__schema, operation), this.ExtractAppropriateObjectForOperation(topLevelObject, operation),
                                variables);

            output.Pop();
        }
示例#3
0
 protected GraphQlMainBase(IGraphQlDocument document, __SchemaContainer schema)
 {
     this.schema          = schema;
     this.documentContext = ((GraphQlDocument)document).GetDocumentContext();
 }