apollo-federation-ruby icon indicating copy to clipboard operation
apollo-federation-ruby copied to clipboard

Field '_service' doesn't exist on type 'Query'

Open iamgnlc opened this issue 4 years ago • 3 comments

I've configured my Rails app per documentation and now trying to get the schema through my gateway build in Node.js, but got:

{ message: 'Field \'_service\' doesn\'t exist on type \'Query\'',
  locations: [ { line: 1, column: 30 } ],
  path: [ 'query GetServiceDefinition', '_service' ],
  extensions:
   { code: 'undefinedField',
     typeName: 'Query',
     fieldName: '_service' } } 0 [ { message: 'Field \'_service\' doesn\'t exist on type \'Query\'',
    locations: [ [Object] ],
    path: [ 'query GetServiceDefinition', '_service' ],
    extensions:
     { code: 'undefinedField',
       typeName: 'Query',
       fieldName: '_service' } } ]

The gateway is working fine with other federated apps, either build in rails or Node.js.

iamgnlc avatar Jun 09 '20 16:06 iamgnlc

I'm also experiencing this issue. Wondering if it may be related to having a Graph::Types::BaseObject with a graphql_name of Query which may be conflicting with: https://github.com/Gusto/apollo-federation-ruby/blob/401ab8eadb4acf1a612c91432f5044c0dbfe6da2/lib/apollo-federation/schema.rb#L39

foerever avatar Feb 25 '21 19:02 foerever

Hey @iamgnlc , @foerever , do y'all happen to be using GraphQL 1.13?

daemonsy avatar Jan 25 '22 16:01 daemonsy

@daemonsy I have the same problem. Error: Couldn't load service definitions for "timetables" at http://127.0.0.1:3000/graphql: 500: Internal Server Error

I've followed README

@edit Done, I needed to generate schema through rover.

KMoscIszko avatar Jun 17 '23 23:06 KMoscIszko