Skip to content
This repository has been archived by the owner on May 26, 2022. It is now read-only.

GraphQL syntax highlighting doesn't handle multi-line string argument for directives #26

Open
johnymontana opened this issue May 18, 2020 · 0 comments

Comments

@johnymontana
Copy link
Contributor

Multi-line string arguments are frequently used with the @cypher directive, however the Prism syntax highlighter doesn't recognize these strings as multi-line strings and syntax highlights them as GraphQL.

For example:

type Business {
    businessId: ID!
    averageStars: Float! @cypher(statement:"MATCH (this)<-[:REVIEWS]-(r:Review) RETURN avg(r.stars)")
    recommended(first: Int = 1): [Business] @cypher(statement: """
      MATCH (this)<-[:REVIEWS]-(:Review)<-[:WROTE]-(:User)-[:WROTE]->(:Review)-[:REVIEWS]->(rec:Business)
      WITH rec, COUNT(*) AS score
      RETURN rec ORDER BY score DESC LIMIT $first
    """)
    name: String!
    city: String!
    state: String!
    address: String!
    location: Point!
    reviews: [Review] @relation(name: "REVIEWS", direction: "IN")
    categories: [Category] @relation(name: "IN_CATEGORY", direction: "OUT")
}

Screen Shot 2020-05-18 at 6 56 15 AM

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant