public GraphQLSchema() { this.schemaObserver = new SchemaObserver(); this.TypeTranslator = new TypeTranslator(this.schemaObserver); this.introspector = new Introspector(this.TypeTranslator); this.IntrospectedSchema = new IntrospectedSchemaType(this.schemaObserver, this.introspector, this); this.RegisterIntrospectionTypes(); }
public void Introspect(IFacetDecoratorSet decorator, IIntrospector introspector) { introspector.IntrospectType(Type, this); FullName = introspector.FullName; ShortName = introspector.ShortName; Superclass = introspector.Superclass; Interfaces = introspector.Interfaces.Cast<ITypeSpecImmutable>().ToImmutableList(); Fields = introspector.Fields; ObjectActions = introspector.ObjectActions; DecorateAllFacets(decorator); }
public static IntrospectedType CreateForObject(GraphQLObjectType type, IIntrospector introspector, IObjectTypeTranslator typeObserver) { var introspectedType = new ComplexIntrospectedType(introspector, typeObserver); introspectedType.Name = type.Name; introspectedType.Description = type.Description; introspectedType.Kind = TypeKind.OBJECT; return(introspectedType); }
public static IntrospectedType CreateForInterface(GraphQLInterfaceType type, IIntrospector introspector, IObjectTypeTranslator typeObserver) { var introspectedType = new ComplexIntrospectedType(introspector, typeObserver); introspectedType.Name = type.Name; introspectedType.Description = type.Description; introspectedType.Kind = TypeKind.INTERFACE; return(introspectedType); }
public void Introspect(IFacetDecoratorSet decorator, IIntrospector introspector) { introspector.IntrospectType(Type, this); FullName = introspector.FullName; ShortName = introspector.ShortName; Superclass = introspector.Superclass; Interfaces = introspector.Interfaces.Cast <ITypeSpecImmutable>().ToImmutableList(); Fields = introspector.Fields; ObjectActions = introspector.ObjectActions; DecorateAllFacets(decorator); }
public IntrospectedSchemaType( ISchemaObserver schemaObserver, IIntrospector introspector, IGraphQLSchema schema) : base( "__Schema", "A GraphQL Schema defines the capabilities of a GraphQL server. It " + "exposes all available types and directives on the server, as well as " + "the entry points for query, mutation, and subscription operations.") { this.introspector = introspector; this.schemaObserver = schemaObserver; this.schema = schema; this.Field("types", () => this.Introspect()); this.Field("queryType", () => introspector.Introspect(this.schema.QueryType)); this.Field("mutationType", () => introspector.Introspect(this.schema.MutationType)); }
internal ComplexIntrospectedType(IIntrospector introspector, IObjectTypeTranslator typeObserver) { this.introspector = introspector; this.typeObserver = typeObserver; }
internal IntrospectedInputObject(IIntrospector introspector, IObjectTypeTranslator typeObserver) { this.introspector = introspector; this.typeObserver = typeObserver; }
public ImmutableDictionary <string, ITypeSpecBuilder> Introspect(IFacetDecoratorSet decorator, IIntrospector introspector, ImmutableDictionary <string, ITypeSpecBuilder> metamodel) { metamodel = introspector.IntrospectType(Type, this, metamodel); FullName = introspector.FullName; ShortName = introspector.ShortName; Superclass = introspector.Superclass; Interfaces = introspector.Interfaces.Cast <ITypeSpecImmutable>().ToImmutableList(); Fields = introspector.Fields; ObjectActions = introspector.ObjectActions; DecorateAllFacets(decorator); return(metamodel); }