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

Add space between merged SDLs to fix merging errors #899

Merged
merged 2 commits into from
Nov 2, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/gateway/build-gateway.js
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ async function buildGateway (gatewayOpts, app) {
throw new MER_ERR_GQL_GATEWAY_INIT('No valid service SDLs were provided')
}

const schema = buildFederatedSchema(serviceSDLs.join(''), true)
const schema = buildFederatedSchema(serviceSDLs.join(' '), true)

const typeToServiceMap = {}
const typeFieldsToService = {}
Expand Down Expand Up @@ -419,7 +419,7 @@ async function buildGateway (gatewayOpts, app) {
async refresh (isRetry) {
const failedMandatoryServices = []
if (this._serviceSDLs === undefined) {
this._serviceSDLs = serviceSDLs.join('')
this._serviceSDLs = serviceSDLs.join(' ')
}

const $refreshResult = await Promise.allSettled(
Expand Down Expand Up @@ -458,7 +458,7 @@ async function buildGateway (gatewayOpts, app) {

const _serviceSDLs = Object.values(serviceMap)
.map((service) => service.schemaDefinition)
.join('')
.join(' ')

if (this._serviceSDLs === _serviceSDLs) {
return null
Expand Down