Ejemplo n.º 1
0
        public CoolStoreSchema(IHttpContextAccessor httpContext, ICoolStoreResolverService resolverService)
        {
            _httpContext = httpContext;
            var schema        = IdlSchema.CreateAsync().Result;
            var schemaBuilder = new SchemaBuilder(schema);
            var resolvers     = new CoolStoreResolvers(resolverService);

            CoolStore = SchemaTools.MakeExecutableSchemaWithIntrospection(
                schemaBuilder,
                resolvers,
                resolvers, new Dictionary <string, CreateDirectiveVisitor>
            {
                ["authorize"] = AuthorizeVisitor()
            });
        }
 public Task <ISchema> FromIdlAsync()
 {
     return(IdlSchema.CreateAsync());
 }