예제 #1
0
        __Type CreateOrGetType(Type t)
        {
            if (resolver.ContainsKey(t) == false)
            {
                resolver[t] = new __Type(t, resolver, customiseSchema);
            }
            var ret = resolver[t];

            if (ret.kind == __TypeKind.INPUT_OBJECT)
            {
                throw new Exception(
                          $"You cannot mix input and output object types in a schema - {t.Name} already appears as INPUT_OBJECT type");
            }
            return(ret);
        }
예제 #2
0
파일: __Field.cs 프로젝트: KhaledSMQ/aml
 public __Field(__Type parentType)
 {
     args            = new List <__InputValue>();
     this.parentType = parentType;
 }
예제 #3
0
 public __Schema(__Type queryType)
 {
     this.queryType = queryType;
 }
예제 #4
0
 public __Schema(__Type queryType, __Type mutationType)
 {
     this.queryType    = queryType;
     this.mutationType = mutationType;
 }
예제 #5
0
 public __InputValue(string name, __Type type)
 {
     this.name = name;
     this.type = type;
 }