private void AddOutputObjectKnownType(GraphQLNullableType type) { var reflectedType = type.GetType(); var argument = ReflectionUtilities.GetGenericArgumentsEagerly(reflectedType); if (argument == null) { this.outputBindings.Add(reflectedType.FullName, type); } else { this.outputBindings.Add(argument.FullName, type); } }
public GraphQLComplexType[] GetTypesImplementing(GraphQLNullableType objectType) { if (objectType is GraphQLInterfaceType) { var type = ReflectionUtilities.GetGenericArgumentsEagerly(objectType.GetType()); return(this.GetOutputKnownTypes() .Where(e => ReflectionUtilities.GetAllImplementingInterfaces( ReflectionUtilities.GetGenericArgumentsEagerly(e.GetType())).Contains(type)) .Select(e => e as GraphQLComplexType) .ToArray()); } return(new GraphQLComplexType[] { }); }
public void AddKnownType(GraphQLNullableType type) { if (type is GraphQLInputObjectType) { this.AddInputObjectKnownType(type); } else if (type is GraphQLComplexType) { this.AddOutputObjectKnownType(type); } else { this.AddInputObjectKnownType(type); this.AddOutputObjectKnownType(type); } }
public IObjectTypeTranslator GetObjectTypeTranslatorFor(GraphQLNullableType type) { return(new ObjectTypeTranslator(type, this, this.schemaObserver)); }
private void RegisterBinding <T>(GraphQLNullableType type) { this.bindings.Add(typeof(T), type); }
public GraphQLNonNullType(GraphQLNullableType nullableType) : base(null, null) { this.UnderlyingNullableType = nullableType; }