hey, i noticed a nuance that im sure many do not r...
# apollo-kotlin
a
hey, i noticed a nuance that im sure many do not run into. For reasons at my company, we've used a node cli tool to do registration using our own custom rules, and introspection functionality. What i noticed is that the tool uses the
graphql
node package to run introspection. The introspection result is quite a bit smaller than the kotlin one (75K lines vs 100K in kotlin) due to the comments on every type and field being multiline in kotlin vs single line in node. we're migrating to native apollo kotlin introspection using gradle. kotlin:
Copy code
"""
  The globally unique identifier.
  """
  id: ID!
Node:
Copy code
"""The globally unique identifier."""
id: ID!
is this expected? any way to direct the apollo kotlin introspection to do the same?e
m
The introspection is probably the same, it's when converting to SDL that we're adding the newlines
How important is this?
If you have newlines in the descriptions, you might have something like
Copy code
"""The globally unique
 identifier."""
id: ID!
Which doesn't look great
We could add rules (probably what graphql-js is doing) but that's extra logic that I'm not so keen on maintaining
The
graphql-js
logic is here
There's actually a bunch of other things we should improve in our printer. If a description has an indent for an example, it's probably going to be lost. This has literally never happened but if we want to be 100% correct we should improve this.
But Re: your initial comment, that leans into having to maintain a full set of linter rules. Which is an interesting problem but probably going to be hard to prioritize
a
ah i see. yeah its not important. ill just communicate to the team that we're moving over to the native apollo kotlin way of introspecting and thats it.
👍 1
i just wanted to see if there was a way i could already infleunce the output, but really not a huge deal
👍 1