mercurius-js / mercurius-gateway

Mercurius federation support plugin
MIT License
17 stars 11 forks source link

Gateway schema init issues No valid service SDLs were provided #116

Open maicolbruski opened 1 week ago

maicolbruski commented 1 week ago

Hi,

I tried to create a gateway for external graphql, but a received a error:

throw new MER_ERR_GQL_GATEWAY_INIT('No valid service SDLs were provided')
          ^
FastifyError [Error]: Gateway schema init issues No valid service SDLs were provided

code:

import Fastify from 'fastify'

const gateway = Fastify()
gateway.register(mercuriusGateway, {
  gateway: {
    services: [
      {
        name: 'brands',
        url: 'http://localhost:4001/graphql'
      }
    ]
  }
})

gateway.listen({ port: 4000 })

My external graphql service its ok on Port 4001, but using yogagraphql.

mcollina commented 6 days ago

Thanks for reporting!

Can you provide steps to reproduce? We often need a reproducible example, e.g. some code that allows someone else to recreate your problem by just copying and pasting it. If it involves more than a couple of different file, create a new repository on GitHub and add a link to that.