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: Implement descriptions as strings #262

Merged
merged 14 commits into from
Dec 24, 2017

Conversation

jamesdphillips
Copy link
Contributor

tldr; when describing your schema using GraphQL's Schema Definition Language (SDL) you can provide descriptions for your types using strings.

"""
My Great Type
"""
type Dog implements Pet {
  name: String!
  breed: [BREED]
}

"""
Pets are great
"""
interface Pets {
  "All pets should have a name"
  name: String!
}

"""
Dog Breeds
"""
enum BREED {
  """
  Description 1
  """
  BORDER_COLLIE
  "Description 2"
  SHIBA
  """
  Do not as me how to spell this
  """
  POM
}

// ...

Signed-off-by: James Phillips <jamesdphillips@gmail.com>
Signed-off-by: James Phillips <jamesdphillips@gmail.com>
Signed-off-by: James Phillips <jamesdphillips@gmail.com>
Signed-off-by: James Phillips <jamesdphillips@gmail.com>
Signed-off-by: James Phillips <jamesdphillips@gmail.com>
Signed-off-by: James Phillips <jamesdphillips@gmail.com>
Signed-off-by: James Phillips <jamesdphillips@gmail.com>
Signed-off-by: James Phillips <jamesdphillips@gmail.com>
Signed-off-by: James Phillips <jamesdphillips@gmail.com>
Signed-off-by: James Phillips <jamesdphillips@gmail.com>
Signed-off-by: James Phillips <jamesdphillips@gmail.com>
Signed-off-by: James Phillips <jamesdphillips@gmail.com>
@coveralls
Copy link

coveralls commented Dec 13, 2017

Coverage Status

Coverage increased (+0.2%) to 82.236% when pulling f9aa8b9 on jamesdphillips:type-descriptions into 7731016 on graphql-go:master.

@coveralls
Copy link

coveralls commented Dec 18, 2017

Coverage Status

Coverage increased (+0.02%) to 82.236% when pulling 1a9c9d2 on jamesdphillips:type-descriptions into 62eb652 on graphql-go:master.

@coveralls
Copy link

coveralls commented Dec 23, 2017

Coverage Status

Coverage increased (+0.02%) to 82.225% when pulling 063a198 on jamesdphillips:type-descriptions into 41d6d3b on graphql-go:master.

@chris-ramon
Copy link
Member

awesome!, thanks a lot @jamesdphillips, merry xmas 🎄

@chris-ramon chris-ramon merged commit 9b5a661 into graphql-go:master Dec 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants