Skip to content

Commit

Permalink
Remove unused trustProxy in the config
Browse files Browse the repository at this point in the history
  • Loading branch information
ardatan committed Aug 2, 2024
1 parent 63de546 commit a1bfc49
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 20 deletions.
8 changes: 8 additions & 0 deletions .changeset/rotten-readers-flash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'@graphql-mesh/cli': patch
'@graphql-mesh/types': patch
---

Removed non-functional \`trustProxy\` option in the config schema
This might cause a non-functional config schemna validation warning
This change does not have any impact on the functionality of the Mesh
2 changes: 0 additions & 2 deletions packages/legacy/cli/src/commands/serve/serve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ export async function serveMesh(
sslCredentials,
endpoint: graphqlPath = '/graphql',
browser = process.env.NODE_ENV?.toLowerCase() !== 'production',
// TODO
// trustProxy = 'loopback',
} = rawServeConfig;

const port = portSelectorFn(
Expand Down
5 changes: 0 additions & 5 deletions packages/legacy/cli/src/commands/serve/yaml-config.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,6 @@ type ServeConfig @md {
"""
playgroundTitle: String
"""
Configure Express Proxy Handling
[Learn more](https://expressjs.com/en/guide/behind-proxies.html)
"""
trustProxy: String
"""
Enable and define a limit for [Request Batching](https://github.com/graphql/graphql-over-http/blob/main/rfcs/Batching.md)
"""
batchingLimit: Int
Expand Down
2 changes: 0 additions & 2 deletions packages/legacy/http/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ export function createMeshHTTPHandler<TServerContext>({
endpoint: graphqlPath = '/graphql',
batchingLimit,
healthCheckEndpoint = '/healthcheck',
// TODO
// trustProxy = 'loopback',
extraParamNames,
} = rawServeConfig;

Expand Down
4 changes: 0 additions & 4 deletions packages/legacy/types/src/config-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,6 @@
"type": "string",
"description": "Title of GraphiQL Playground"
},
"trustProxy": {
"type": "string",
"description": "Configure Express Proxy Handling\n[Learn more](https://expressjs.com/en/guide/behind-proxies.html)"
},
"batchingLimit": {
"type": "integer",
"description": "Enable and define a limit for [Request Batching](https://github.com/graphql/graphql-over-http/blob/main/rfcs/Batching.md)"
Expand Down
5 changes: 0 additions & 5 deletions packages/legacy/types/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,6 @@ export interface ServeConfig {
* Title of GraphiQL Playground
*/
playgroundTitle?: string;
/**
* Configure Express Proxy Handling
* [Learn more](https://expressjs.com/en/guide/behind-proxies.html)
*/
trustProxy?: string;
/**
* Enable and define a limit for [Request Batching](https://github.com/graphql/graphql-over-http/blob/main/rfcs/Batching.md)
*/
Expand Down
2 changes: 0 additions & 2 deletions website/src/generated-markdown/ServeConfig.generated.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ This feature can be disabled by passing `false` One of:
* `String`
* `Boolean`
* `playgroundTitle` (type: `String`) - Title of GraphiQL Playground
* `trustProxy` (type: `String`) - Configure Express Proxy Handling
[Learn more](https://expressjs.com/en/guide/behind-proxies.html)
* `batchingLimit` (type: `Int`) - Enable and define a limit for [Request Batching](https://github.com/graphql/graphql-over-http/blob/main/rfcs/Batching.md)
* `healthCheckEndpoint` (type: `String`) - Endpoint for [Health Check](https://the-guild.dev/graphql/yoga-server/docs/features/health-check)
* `extraParamNames` (type: `Array of String`) - By default, GraphQL Mesh does not allow parameters in the request body except `query`, `variables`, `extensions`, and `operationName`.
Expand Down

0 comments on commit a1bfc49

Please sign in to comment.