Skip to content

cacheControl hints only propagated on root fields when using schema stitching #505

Closed
@kbrandwijk

Description

@kbrandwijk

Using makeExecutableSchema shows cacheControl hints on all fields, using mergeSchemas only shows cacheControl hints on root fields:
https://launchpad.graphql.com/r9lmrp989n correctly shows (with cacheControl enabled):

"cacheControl": {
      "version": 1,
      "hints": [
        {
          "path": [
            "myTest"
          ],
          "maxAge": 120
        },
        {
          "path": [
            "myTest",
            0,
            "title"
          ],
          "maxAge": 60
        },
        {
          "path": [
            "myTest",
            0,
            "description"
          ],
          "scope": "PRIVATE"
        }
      ]
    }

Now using mergeSchemas instead of makeExecutableSchema gives:

"cacheControl": {
      "version": 1,
      "hints": [
        {
          "path": [
            "myTest"
          ],
          "maxAge": 0
        }
      ]
    }

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions