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.

schema.graphql generation broken after update

See original GitHub issue

Bug Report

Currently the schema.graphql still uses multiline comments, which leads to an error in my tests.

Current behavior

GraphQLError: Syntax Error: Unexpected BlockString "What change was done?".

Input Code

registerEnumType(AuditAction, {
  name: 'AuditAction',
  description: 'What change was done?',
});

Output schema.graphql

"""What change was done?"""
enum AuditAction {
  APPROVED
  ASSIGNED
  ...
}

Expected behavior

# What change was done?
enum AuditAction {
  APPROVED
  ASSIGNED
  ...
}

Possible Solution

Genrate correct comments with # instead of """? At least when I do a search and replace, it does work indeed. Which package is responsible for generating that?

Environment

{  
  "@nestjs/axios": "^0.0.1",
  "@nestjs/common": "8.0.6",
  "@nestjs/config": "1.0.1",
  "@nestjs/core": "8.0.6",
  "@nestjs/graphql": "^9.0.2",
  "@nestjs/platform-express": "^8.0.6",
  "apollo-server-express": "^3.3.0",
  "graphql": "^15.5.1",
  "graphql-tools": "8.1.0",
  "reflect-metadata": "0.1.13"
},
"devDependencies": {
  "@nestjs/cli": "8.1.1",
  "@nestjs/schematics": "^8.0.3",
  "@nestjs/testing": "8.0.6"
}

For Tooling issues:

  • Node version: v14.17.3
  • Platform: Mac

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:17 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
elliotttfcommented, Sep 2, 2021

I can also confirm this is resolved with 9.0.3+. Thank you!

1reaction
anchan828commented, Sep 2, 2021
Read more comments on GitHub >

github_iconTop Results From Across the Web

Five Common Problems in GraphQL Apps (And How to Fix ...
Schema duplication ; Server/client data mismatch; Superfluous database calls; Poor performance; Boilerplate overdose. I'm willing to bet your app ...
Read more >
Subscriptions - Apollo GraphQL Docs
Subscriptions are useful for notifying your client in real time about changes to back-end data, such as the creation of a new object...
Read more >
Schema Transformation – GraphQL Mesh
The sequence diagram shows that Mesh always applies transforms in order, which means a given transformer can impact the following one.
Read more >
SmallRye GraphQL - Quarkus
Since GraphQL API's returns data that are requested by the client adding ... The updated schema will now include the new Ally type...
Read more >
Troubleshooting Common Errors - Gatsby
If the data you are requesting in a GraphQL query differs from what has been sourced in the GraphQL schema you might encounter...
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