From 30d1cf7e0a5955355ca6b91959ab5a3cc8bf5e57 Mon Sep 17 00:00:00 2001 From: Maria Elisabeth Schreiber Date: Tue, 25 Jun 2024 14:44:07 -0600 Subject: [PATCH] Add HTTP connection (#889) --- .eslintrc.js | 1 + src/content/shared/index.js | 1 + src/content/shared/router-http-connection.js | 103 +++++++++++++++++++ 3 files changed, 105 insertions(+) create mode 100644 src/content/shared/router-http-connection.js diff --git a/.eslintrc.js b/.eslintrc.js index bebe67f0d..fb0fd07d6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -37,6 +37,7 @@ module.exports = { ExperimentalFeature: 'readonly', GraphOSEnterpriseRequired: 'readonly', GraphOSRouterFeatures: 'readonly', + HttpConnection: 'readonly', InconsistentCompositionRules: 'readonly', ObtainGraphApiKey: 'readonly', ObtainPersonalApiKey: 'readonly', diff --git a/src/content/shared/index.js b/src/content/shared/index.js index 260f4cb86..6ad3f7b7c 100644 --- a/src/content/shared/index.js +++ b/src/content/shared/index.js @@ -5,6 +5,7 @@ export {default as ClientPQImplementation} from './client-pq-implementation.mdx' export {default as ClientPQIntro} from './client-pq-intro.mdx'; export {default as CreateSelfHostedSupergraph} from './create-self-hosted-supergraph.mdx'; export {CreateNotification} from './create-notification.js'; +export {HttpConnection} from './router-http-connection.js'; export {default as ConfigurePagerDutyNotification} from './configure-pagerduty-notification.mdx'; export {default as ConfigureSlackNotification} from './configure-slack-notification.mdx'; export {ConfigureWebhookNotification} from './configure-webhook-notification.js'; diff --git a/src/content/shared/router-http-connection.js b/src/content/shared/router-http-connection.js new file mode 100644 index 000000000..56607e699 --- /dev/null +++ b/src/content/shared/router-http-connection.js @@ -0,0 +1,103 @@ +import PropTypes from 'prop-types'; +import React from 'react'; +import { + Box, + Code, + ListItem, + Table, + Tbody, + Td, + Text, + Th, + Thead, + Tr, + UnorderedList +} from '@chakra-ui/react'; +import {Note} from '../../components/Note'; + +export const HttpConnection = ({type}) => { + return ( + + The router supports {type} connections over: + + HTTP/1.1 + HTTP/1.1 with TLS + HTTP/2 with TLS + + HTTP/2 Cleartext protocol (h2c). This uses HTTP/2 over plaintext + connections. + + + + Use the table below to look up the resulting protocol of a {type}{' '} + connection, based on the {type === 'subgraph' ? 'subgraph' : ''} URL and + the experimental_http2 configuration: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ URL with http:// + + URL with https:// +
+ experimental_http2: + disable + HTTP/1.1HTTP/1.1 with TLS
+ experimental_http2: + enable + HTTP/1.1 + Either HTTP/1.1 or HTTP/2 with TLS, as determined by the TLS + handshake +
+ experimental_http2: + http2only + h2cHTTP/2 with TLS
+ experimental_http2 +
+ not set +
HTTP/1.1 + Either HTTP/1.1 or HTTP/2 with TLS, as determined by the TLS + handshake +
+ + + Configuring experimental_http2: http2only for a{' '} + {type === 'coprocessor' ? 'network' : 'subgraph'} that doesn't + support HTTP/2 results in a failed {type} connection. + + +
+ ); +}; + +HttpConnection.propTypes = { + type: PropTypes.string.isRequired +};