Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access to stitched http response headers (e.g. Set-Cookie) Documentation #754

Closed
michaelstaib opened this issue May 16, 2019 · 1 comment
Assignees
Labels
📚 documentation This issue is about working on our documentation.
Milestone

Comments

@michaelstaib
Copy link
Member

No description provided.

@michaelstaib michaelstaib added the 📚 documentation This issue is about working on our documentation. label May 16, 2019
@michaelstaib michaelstaib added this to the 9.0.0 milestone May 16, 2019
@michaelstaib michaelstaib self-assigned this May 16, 2019
@michaelstaib
Copy link
Member Author

Hint for the documentation.

var serviceCollection = new ServiceCollection();
serviceCollection.AddSingleton<IHttpQueryRequestInterceptor>(
    new DummyInterceptor());
serviceCollection.AddSingleton(CreateRemoteSchemas());
serviceCollection.AddStitchedSchema(builder =>
    builder.AddSchemaFromHttp("contract")
        .AddSchemaFromHttp("customer")
        .AddExtensionsFromString(
            FileResource.Open("StitchingExtensions.graphql"))
        .AddSchemaConfiguration(c =>
            c.RegisterType<PaginationAmountType>())
        .AddSchemaConfiguration(c =>
            c.RegisterType(new ObjectTypeExtension(d => d
                .Name("Customer")
                .Field("inter")
                .Type<StringType>()
                .Directive<ComputedDirective>()
                .Resolver(ctx =>
                {
                    return ctx.ScopedContextData["foo"];
                })))));
public class DummyInterceptor
            : IHttpQueryRequestInterceptor
        {
            public Task OnResponseReceivedAsync(
                IHttpQueryRequest request,
                HttpResponseMessage response,
                IQueryResult result)
            {
                result.ContextData["foo"] = "bar";
                return Task.CompletedTask;
            }
        }

@michaelstaib michaelstaib modified the milestones: 9.0.0, 10.0.0 Aug 7, 2019
@michaelstaib michaelstaib modified the milestones: 10.0.0, 10.1.0, 10.2.0 Sep 10, 2019
@michaelstaib michaelstaib modified the milestones: 10.2.0, 10.3.0 Nov 29, 2019
@michaelstaib michaelstaib modified the milestones: HC-10.3.0, HC-10.4.0 Jan 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📚 documentation This issue is about working on our documentation.
Projects
None yet
Development

No branches or pull requests

1 participant