__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); }
public __Field(__Type parentType) { args = new List <__InputValue>(); this.parentType = parentType; }
public __Schema(__Type queryType) { this.queryType = queryType; }
public __Schema(__Type queryType, __Type mutationType) { this.queryType = queryType; this.mutationType = mutationType; }
public __InputValue(string name, __Type type) { this.name = name; this.type = type; }