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

sdl-encoder: encode string values with single quotes (") #930

Merged
merged 2 commits into from
Nov 18, 2021

Commits on Nov 18, 2021

  1. sdl-encoder: encode string values with single quotes (")

    We've been encoding all BlockStringValues and StringValues by surrounding them with `"""`. StringValue is meant to be encoded with just a single `"`. If a description does not include a line break or a `"`, we assume it's a StringValue.
    
    This means that instead of printing this:
    ```graphql
    """Shopping list for cats at the pet store"""
    type PetStoreTrip implements ShoppingTrip {
      toys: [DanglerPoleToys] @deprecated(reason: "Cats are too spoiled")
      """Dry or wet food?"""
      food: FoodType
      catGrass: Boolean
    }
    ```
    
    we encode this:
    ```graphql
    "Shopping list for cats at the pet store"
    type PetStoreTrip implements ShoppingTrip {
      toys: [DanglerPoleToys] @deprecated(reason: "Cats are too spoiled")
      "Dry or wet food?"
      food: FoodType
      catGrass: Boolean
    }
    ```
    lrlna committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    006b07f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3ca4419 View commit details
    Browse the repository at this point in the history