Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Leading white spaces in description casuing issues #1489

Closed
firaskafri opened this issue Jan 6, 2023 · 1 comment
Closed

Leading white spaces in description casuing issues #1489

firaskafri opened this issue Jan 6, 2023 · 1 comment
Labels

Comments

@firaskafri
Copy link
Contributor

Note: for support questions, please use stackoverflow. This repository's issues are reserved for feature requests and bug reports.

  • What is the current behavior?
    Currently Scalar types and Field types pass description without touching it which is causing the issue of inconsistent white spaces in the case of multi-line descriptions when parsed by federation services.

  • If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via
    a github repo, https://repl.it or similar.

1 - Add a multi-line description argument to any Scalar or Field
2 - Generate schema
3 - Try to build a service schema using graphene-federation
4 - Connect the service to a federation gateway

  • What is the expected behavior?

Leading white spaces in multi-line description must be stripped

  • What is the motivation / use case for changing the behavior?
    Building a federated gateway

  • Please tell us about your environment:

    • Version:
    • Platform:
  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow)

@erikwrede
Copy link
Member

Hey Firas,
what exactly is the difference between the federation-stitched docstring and a docstring from pure graphene when looking at the schema? Why does this only apply to federated schemas and is it not desirable to add whitespace and indent to the docstrings sometimes?

Since GQL-docstrings are formatted in Markdown, stripping the whitespaces would remove features like lists with multiple levels of indentation:

  • A
    • B
      • C
* A
    * B
        * C

@firaskafri firaskafri closed this as not planned Won't fix, can't repro, duplicate, stale Jan 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants