Odyssey Voyage II: Federating the monolith - Value types "Cannot query field \"me\" on type \"Query\"

Hello there,

I am having issues with querying the schema after the monolith and accounts subgraphs have been published to apollo studio.

When I put the following query in explorer to test my schema changes:

query GetMyProfile {
  me {
    id
    name
    profilePicture
  }
}

I get the following error:

{
  "errors": [
    {
      "message": "Cannot query field \"me\" on type \"Query\".",
      "extensions": {
        "code": "GRAPHQL_VALIDATION_FAILED",
        "exception": {
          "stacktrace": [
            "GraphQLError: Cannot query field \"me\" on type \"Query\".",
            "    at Object.Field (/Users/gbLiNgMy/Documents/odyssey-voyage-II-server/subgraph-accounts/node_modules/graphql/validation/rules/FieldsOnCorrectTypeRule.js:51:13)",
            "    at Object.enter (/Users/gbLiNgMy/Documents/odyssey-voyage-II-server/subgraph-accounts/node_modules/graphql/language/visitor.js:301:32)",
            "    at Object.enter (/Users/gbLiNgMy/Documents/odyssey-voyage-II-server/subgraph-accounts/node_modules/graphql/utilities/TypeInfo.js:391:27)",
            "    at visit (/Users/gbLiNgMy/Documents/odyssey-voyage-II-server/subgraph-accounts/node_modules/graphql/language/visitor.js:197:21)",
            "    at validate (/Users/gbLiNgMy/Documents/odyssey-voyage-II-server/subgraph-accounts/node_modules/graphql/validation/validate.js:91:24)",
            "    at validate (/Users/gbLiNgMy/Documents/odyssey-voyage-II-server/subgraph-accounts/node_modules/apollo-server-core/dist/requestPipeline.js:186:39)",
            "    at processGraphQLRequest (/Users/gbLiNgMy/Documents/odyssey-voyage-II-server/subgraph-accounts/node_modules/apollo-server-core/dist/requestPipeline.js:98:34)",
            "    at processTicksAndRejections (internal/process/task_queues.js:95:5)",
            "    at async processHTTPRequest (/Users/gbLiNgMy/Documents/odyssey-voyage-II-server/subgraph-accounts/node_modules/apollo-server-core/dist/runHttpQuery.js:220:30)"
          ]
        }
      }
    }
  ]
}

I have also included the Authorization token Bearer user-1

I should be getting the Cannot return null for non-nullable field Host.name. error but I’m not meaning I must have done some step wrong or my schema wasn’t published correctly?

I checked my SDL and I have both the monolith and accounts subgraphs listed. Is there anything I may have missed?

bumping this thread for more visibility :sweat_smile:

Hi @kingdomhearts, my apologies for missing this!

It’s difficult to troubleshoot without seeing the code. Would you be able to provide links to your code?

I would also double check that you’re querying the correct endpoint!