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

spelling of content_negociation corrected to content_negotiation #3162

Merged
merged 9 commits into from
Aug 15, 2023
5 changes: 5 additions & 0 deletions .changesets/fix_spelling_content_negotiation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
### spelling of content_negociation corrected to content_negotiation ([PR #3162](https://github.com/apollographql/router/pull/3162))
abernix marked this conversation as resolved.
Show resolved Hide resolved

spelling mistake in content_negociation is fixed

By [@krishna15898](https://github.com/krishna15898) in https://github.com/apollographql/router/pull/3162
2 changes: 1 addition & 1 deletion apollo-router/src/services/layers/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! Layers that are internal to the execution pipeline.
pub(crate) mod allow_only_http_post_mutations;
pub(crate) mod apq;
pub(crate) mod content_negociation;
pub(crate) mod content_negotiation;
pub(crate) mod persisted_queries;
pub(crate) mod query_analysis;
pub(crate) mod static_page;
8 changes: 4 additions & 4 deletions apollo-router/src/services/router_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ use tower_service::Service;
use tracing::Instrument;

use super::layers::apq::APQLayer;
use super::layers::content_negociation;
use super::layers::content_negotiation;
use super::layers::query_analysis::QueryAnalysisLayer;
use super::layers::static_page::StaticPageLayer;
use super::new_service::ServiceFactory;
Expand All @@ -51,7 +51,7 @@ use crate::protocols::multipart::Multipart;
use crate::protocols::multipart::ProtocolMode;
use crate::query_planner::QueryPlanResult;
use crate::router_factory::RouterFactory;
use crate::services::layers::content_negociation::GRAPHQL_JSON_RESPONSE_HEADER_VALUE;
use crate::services::layers::content_negotiation::GRAPHQL_JSON_RESPONSE_HEADER_VALUE;
use crate::services::layers::persisted_queries::PersistedQueryLayer;
use crate::services::layers::persisted_queries::PersistedQueryManifestPoller;
use crate::services::RouterRequest;
Expand Down Expand Up @@ -378,7 +378,7 @@ impl RouterService {
.unwrap_or_else(|| {
Err((
StatusCode::BAD_REQUEST,
"There was no GraphQL operation to execute. Use the `query` parameter to send an operation, using either GET or POST.",
"There was no GraphQL operation to execute. Use the `query` parameter to send an operation, using either GET or POST.",
"There was no GraphQL operation to execute. Use the `query` parameter to send an operation, using either GET or POST.".to_string()
))
})
Expand Down Expand Up @@ -524,7 +524,7 @@ impl RouterCreator {
Error = BoxError,
Future = BoxFuture<'static, router::ServiceResult>,
> + Send {
let router_service = content_negociation::RouterLayer::default().layer(RouterService::new(
let router_service = content_negotiation::RouterLayer::default().layer(RouterService::new(
self.supergraph_creator.clone(),
self.apq_layer.clone(),
self.persisted_query_layer.clone(),
Expand Down
2 changes: 1 addition & 1 deletion apollo-router/src/services/subgraph_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ use tracing::Instrument;
use tracing_opentelemetry::OpenTelemetrySpanExt;
use uuid::Uuid;

use super::layers::content_negociation::GRAPHQL_JSON_RESPONSE_HEADER_VALUE;
use super::layers::content_negotiation::GRAPHQL_JSON_RESPONSE_HEADER_VALUE;
use super::Plugins;
use crate::error::FetchError;
use crate::graphql;
Expand Down
6 changes: 3 additions & 3 deletions apollo-router/src/services/supergraph_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ use tracing_futures::Instrument;

use super::execution::QueryPlan;
use super::layers::allow_only_http_post_mutations::AllowOnlyHttpPostMutationsLayer;
use super::layers::content_negociation;
use super::layers::content_negotiation;
use super::layers::query_analysis::Compiler;
use super::layers::query_analysis::QueryAnalysisLayer;
use super::new_service::ServiceFactory;
Expand Down Expand Up @@ -736,7 +736,7 @@ impl SupergraphCreator {
.layer(shaping.supergraph_service_internal(supergraph_service));

ServiceBuilder::new()
.layer(content_negociation::SupergraphLayer::default())
.layer(content_negotiation::SupergraphLayer::default())
.service(
self.plugins
.iter()
Expand Down Expand Up @@ -803,7 +803,7 @@ mod tests {
type Subscription @join__type(graph: USER) {
userWasCreated: User
}

type User
@join__owner(graph: USER)
@join__type(graph: ORGA, key: "id")
Expand Down
10 changes: 2 additions & 8 deletions docs/source/customizations/coprocessor.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ Properties of the JSON body are divided into two high-level categories:
- These provide information about the context of the specific router request or response. They provide a mechanism to influence the router's execution flow.
- The router always includes these properties in coprocessor requests.
- Data properties
- These provide information about the substance of a request or response, such as the GraphQL query string and any HTTP headers. Aside from `sdl`, your coprocessor can modify all of these properties.
- These provide information about the substance of a request or response, such as the GraphQL query string and any HTTP headers. Aside from `sdl`, your coprocessor can modify all of these properties.
- You [configure which of these fields](#setup) the router includes in its coprocessor requests. By default, the router includes _none_ of them.

### Example requests by stage
Expand Down Expand Up @@ -310,7 +310,6 @@ Properties of the JSON body are divided into two high-level categories:
},
"context": {
"entries": {
"content-negociation:accepts-wildcard": true,
"apollo_telemetry::usage_reporting": {
"statsReportKey": "# TopProducts\nquery TopProducts{topProducts{name price reviews{body id}}}",
"referencedFieldsByType": {
Expand Down Expand Up @@ -339,9 +338,7 @@ Properties of the JSON body are divided into two high-level categories:
},
"apollo_telemetry::client_version": "",
"apollo_telemetry::subgraph_metrics_attributes": {},
"content-negociation:accepts-json": false,
"apollo_telemetry::client_name": "",
"content-negociation:accepts-multipart": false
}
},
"uri": "https://reviews.demo.starstuff.dev/",
Expand Down Expand Up @@ -438,9 +435,6 @@ Properties of the JSON body are divided into two high-level categories:
},
"context": {
"entries": {
"content-negociation:accepts-wildcard": true,
"content-negociation:accepts-json": false,
"content-negociation:accepts-multipart": false,
"apollo_telemetry::usage_reporting": {
"statsReportKey": "# TopProducts\nquery TopProducts{topProducts{name price reviews{body id}}}",
"referencedFieldsByType": {
Expand Down Expand Up @@ -603,7 +597,7 @@ Currently, this value is always `1`.
<td>

The body of the corresponding request or response.

This field is populated when the underlying HTTP method is `POST`. If you are looking for operation data on `GET` requests, that info will be populated in the `path` parameter per the [GraphQL over HTTP spec](https://github.com/graphql/graphql-over-http/blob/main/spec/GraphQLOverHTTP.md#get).

If your coprocessor [returns a _different_ value](#responding-to-coprocessor-requests) for `body`, the router replaces the existing body with that value. This is common when [terminating a client request](#terminating-a-client-request).
Expand Down