在typedef中定义的注释不会出现在Apollo Server 2.0 Playground UI中

时间:2019-01-21 23:55:03

标签: apollo-server

我在typedef文件中编写的描述性注释似乎未出现在Apollo Server 2.0 Playground UI中。这是屏幕截图

Screen shot of UI without comment

我正在使用gql模块在​​NodeJS中创建typedef文件,如下所示:

const { gql } = require('apollo-server');

    # Describes an album released by either a band or musician
    type Album {
        id: String
        title: String
        releaseDate: String
        songs: [Song]
        musician: Musician
        band: Band
    }

在此先感谢您的帮助!

1 个答案:

答案 0 :(得分:0)

一位同事建议使用3个引号。它在def类型的开头起作用:

"""
musicians describes the composer(s) of the song
"""