Skip to content

extend scalar X directives are lost #2509

@LastDragon-ru

Description

@LastDragon-ru

Describe the bug

The resulting directives for Scalar

scalar Scalar 
@scalar(class: "GraphQL\\Type\\Definition\\StringType")
@directive(location: "scalar")

extend scalar Scalar 
@directive(location: "extend")

will be

scalar Scalar 
@scalar(class: "GraphQL\\Type\\Definition\\StringType")
@directive(location: "scalar")

Meanwhile the graphql-php gives both (as it should be):

scalar Scalar
@scalar(class: "GraphQL\\Type\\Definition\\StringType")
@directive(
    location: "scalar"
)
@directive(
    location: "extend"
)

Expected behavior/Solution

Scalar should have all directives from extension nodes.

Steps to reproduce

  1. Create the schema with extend scalar X @directive
  2. Print it

Lighthouse Version

v6.33.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions