question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support docstrings

See original GitHub issue

I believe the draft SDL spec now supports docstring-style string descriptions. So this reports as an error, when I’m pretty sure the following should be valid:

"""
Nullable because the field refers to data that may be absent. This is only
required if there is another nullability decorator, otherwise, it is implicit 
that a nullable field is optional.
"""
directive @nullableOptional on FIELD

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:26
  • Comments:9

github_iconTop GitHub Comments

4reactions
jimkyndemeyercommented, Jun 19, 2018

The 2.0 alpha follows the latest GraphQL language draft spec as of June 2018.

See 2.0.0-alpha-2 if you’d like to try it and help test it.

3reactions
jimkyndemeyercommented, Mar 11, 2019

@blacksmoke26 The GraphQL grammar only allows the single/triple quote strings to be used as descriptions in type system definitions, hence the expectation that a definition follows immediately after.

Comments are still single line and marked by #.

See https://facebook.github.io/graphql/June2018/#sec-Appendix-Grammar-Summary.Document

Read more comments on GitHub >

github_iconTop Results From Across the Web

Specify types with docstrings | PyCharm Documentation
To specify the parameter types, follow these general steps · Press Ctrl+Alt+S and go to Editor | General |Smart Keys. · Place the...
Read more >
Python Docstrings Tutorial : Examples & Format for Pydoc ...
Docstrings help you understand the capabilities of a module or a function. For example, let's say you installed the scikit-learn library and you...
Read more >
Python Docstrings - GeeksforGeeks
Python documentation strings (or docstrings) provide a convenient way of associating documentation with Python modules, functions, classes, ...
Read more >
Python Docstrings (With Examples) - Programiz
In this tutorial, we will learn about Python docstrings. More specifically, we will learn how and why docstrings are used with the help...
Read more >
Example Google Style Python Docstrings - Napoleon
coding: utf-8 -*- """Example Google style docstrings. This module demonstrates documentation as specified by the `Google Python Style Guide`_.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found