Coder Social home page Coder Social logo

Comments (5)

2fd avatar 2fd commented on July 24, 2024

The latest version is showing the comments correctly.
https://2fd.github.io/graphdoc/shopify/mutation.doc.html

captura de pantalla 2017-08-25 a la s 17 24 00

Which one are you using?
From what scheme are you generating the documentation? IDL, HTTP or JSON?

from graphdoc.

lednhatkhanh avatar lednhatkhanh commented on July 24, 2024

I installed it as a dependence: "@2fd/graphdoc": "^2.4.0" for my project and then add this script to my package.json:

"graphdoc": {
    "endpoint": "http://localhost:5000/graphql",
    "output": "./doc/schema"
  },
"scripts": {
    "doc": "graphdoc -f"
  },

And that's what I got when running npm run doc.

from graphdoc.

2fd avatar 2fd commented on July 24, 2024

Could you run the following query and post the result?

fragment FullType on __Type {
  fields(includeDeprecated: true) {
    name
    description
    args {
      ...InputValue
    }
    type {
      ...TypeRef
    }
    isDeprecated
    deprecationReason
  }
  inputFields {
    ...InputValue
  }
  interfaces {
    ...TypeRef
  }
  enumValues(includeDeprecated: true) {
    name
    description
    isDeprecated
    deprecationReason
  }
  possibleTypes {
    ...TypeRef
  }
}

fragment InputValue on __InputValue {
  name
  description
  type {
    ...TypeRef
  }
  defaultValue
}

fragment TypeRef on __Type {
  kind
  name
  description
  ofType {
    kind
    name
    description
    ofType {
      kind
      name
      description
      ofType {
        kind
        name
        description
        ofType {
          kind
          name
          description
          ofType {
            kind
            name
            description
            ofType {
              kind
              name
              description
              ofType {
                kind
                name
                description
              }
            }
          }
        }
      }
    }
  }
}

{
  __type(name: "Mutation") {
    name
    kind
    description
    ...FullType
  }
}

from graphdoc.

lednhatkhanh avatar lednhatkhanh commented on July 24, 2024

Thank you for the response, here is the result:

  "data": {
    "__type": {
      "name": "Mutation",
      "kind": "OBJECT",
      "description": "",
      "fields": [
        {
          "name": "register",
          "description": "Register new user, need to remove Authorization and RefreshToken headers",
          "args": [
            {
              "name": "firstname",
              "description": "",
              "type": {
                "kind": "NON_NULL",
                "name": null,
                "description": null,
                "ofType": {
                  "kind": "SCALAR",
                  "name": "String",
                  "description": "The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.",
                  "ofType": null
                }
              },
              "defaultValue": null
            },
            {
              "name": "lastname",
              "description": "",
              "type": {
                "kind": "NON_NULL",
                "name": null,
                "description": null,
                "ofType": {
                  "kind": "SCALAR",
                  "name": "String",
                  "description": "The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.",
                  "ofType": null
                }
              },
              "defaultValue": null
            },
            {
              "name": "email",
              "description": "",
              "type": {
                "kind": "NON_NULL",
                "name": null,
                "description": null,
                "ofType": {
                  "kind": "SCALAR",
                  "name": "String",
                  "description": "The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.",
                  "ofType": null
                }
              },
              "defaultValue": null
            },
            {
              "name": "password",
              "description": "",
              "type": {
                "kind": "NON_NULL",
                "name": null,
                "description": null,
                "ofType": {
                  "kind": "SCALAR",
                  "name": "String",
                  "description": "The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.",
                  "ofType": null
                }
              },
              "defaultValue": null
            }
          ],
          "type": {
            "kind": "NON_NULL",
            "name": null,
            "description": null,
            "ofType": {
              "kind": "OBJECT",
              "name": "User",
              "description": "",
              "ofType": null
            }
          },
          "isDeprecated": false,
          "deprecationReason": null
        },
        {
          "name": "login",
          "description": "Login to system, need to remove Authorization and RefreshToken headers",
          "args": [
            {
              "name": "email",
              "description": "",
              "type": {
                "kind": "NON_NULL",
                "name": null,
                "description": null,
                "ofType": {
                  "kind": "SCALAR",
                  "name": "String",
                  "description": "The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.",
                  "ofType": null
                }
              },
              "defaultValue": null
            },
            {
              "name": "password",
              "description": "",
              "type": {
                "kind": "NON_NULL",
                "name": null,
                "description": null,
                "ofType": {
                  "kind": "SCALAR",
                  "name": "String",
                  "description": "The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.",
                  "ofType": null
                }
              },
              "defaultValue": null
            }
          ],
          "type": {
            "kind": "OBJECT",
            "name": "LoginResponse",
            "description": "",
            "ofType": null
          },
          "isDeprecated": false,
          "deprecationReason": null
        }
      ],
      "inputFields": null,
      "interfaces": [],
      "enumValues": null,
      "possibleTypes": null
    }
  }
}

from graphdoc.

2fd avatar 2fd commented on July 24, 2024

In your schema all parameter descriptions are empty strings

    {
              "name": "firstname",
              "description": "",   //   <--- Parameter description is empty string
              "type": {
                "kind": "NON_NULL",
                "name": null,
                "description": null,
                "ofType": { /* ... */ }
              },
              "defaultValue": null
    }

How are you generating your schema?

from graphdoc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.