You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Operating System (or Browser): windows 10, firefox latest
Node Version: v16.13.1
apollo-log Version: 1.1.0
How Do We Reproduce?
I suspect this is OS specific. To repro just use apollo-log as normal on a windows 10 machine. I am using conemu as my terminal but the same happens on windows default cmd
Expected Behavior
The logs are displayed with linebreaks etc so that they can be easily read.
Server is running on http://localhost:4000/graphql
apollo 21d17c {"event":"request","query":" query IntrospectionQuery { __schema { queryType { name } mutationType { name } subscriptionType { name } types { ...FullType } directives { name description locations args { ...InputValue } } } } fragment FullType on __Type { kind name description 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 ofType { kind name ofType { kind
name ofType { kind name ofType { kind name ofType { kind name ofType { kind
name ofType {
Observations
So the problem arises from the call to stringify() here:
when I removed stringify() and just returned the mutated variable the formatting was correct (as shown in expected behaviour above). log[(data as any).errors ? 'error' : 'info'](chalk`{dim ${id}}`, mutated);
also I removed the line deleting newline chars in the query here
How Do We Reproduce?
I suspect this is OS specific. To repro just use apollo-log as normal on a windows 10 machine. I am using conemu as my terminal but the same happens on windows default cmd
Expected Behavior
The logs are displayed with linebreaks etc so that they can be easily read.
Actual Behavior
Observations
So the problem arises from the call to
stringify()
here:apollo-log/src/index.ts
Line 55 in 0b33bcd
when I removed
stringify()
and just returned themutated
variable the formatting was correct (as shown in expected behaviour above).log[(data as any).errors ? 'error' : 'info'](chalk`{dim ${id}}`, mutated);
also I removed the line deleting newline chars in the query here
https://github.com/edzillion/apollo-log/blob/0b33bcd29f17ca8d321586b4770fe1c779ff96cb/src/index.ts#L69
The text was updated successfully, but these errors were encountered: