Skip to content

Update Prettier version to allow 'interfaces to implement other interfaces' #1415

Open
@joaohaas

Description

@joaohaas

This issue pertains to the following package(s):

  • GraphQL Playground - Electron App
  • GraphQL Playground HTML
  • GraphQL Playground
  • GraphQL Playground Express Middleware
  • GraphQL Playground Hapi Middleware
  • GraphQL Playground Koa Middleware
  • GraphQL Playground Lambda Middleware

What OS and OS version are you experiencing the issue(s) on?

MacOS and Linux

What version of graphql-playground(-electron/-middleware) are you experiencing the issue(s) on?

Not really sure, it's from an internal forked version, but it should happen in all versions.

What is the expected behavior?

Given you have an interface that implements another interface (interface A implements B), the Schema tab should not break.

What is the actual behavior?

Currently trying to access the Schema tab on the side bar breaks the app. I managed to trace the issue to the prettify function in utils.ts, which in turn calls Prettier. Checking Prettier's changelog, this 'feature' was only implemented in version 2.1:
https://prettier.io/blog/2020/08/24/2.1.0.html#allow-interfaces-to-implement-other-interfaces-8007httpsgithubcomprettierprettierpull8007-by-fiskerhttpsgithubcomfisker

Changing the version to 2.1.2 fixed the issue for me, but maybe it could be upgraded further.

What steps may we take to reproduce the behavior?

Implement an interface to another interface and try to access the Schema tab on the sidel.

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