exogen / graphql-markdown

The easiest way to document your GraphQL schema.
MIT License
179 stars 55 forks source link

Add named anchors to fields #84

Closed cyberwombat closed 1 month ago

cyberwombat commented 2 years ago

This PR adds named anchors to field names so they can be references externally. For some reason when I ran lint:fix it reformatted differently than current codebase hence the many changes.

exogen commented 2 months ago

(I realize this response is very late, sorry about that.)

To do this, I think we'd need to prefix the anchor name with the type name it's a part of, since there will usually be many repeated field names (like say id), so you'd want something more like #author--id. Otherwise only the first field with each name would be linkable.

fmontorsi-equinix commented 2 months ago

hi @cyberwombat , @exogen do you think you are going to work on this one? I have no Javascript skills so if you are going to, I'm happy to wait :)

cyberwombat commented 2 months ago

@fmontorsi-equinix I will not. I don't even remember why I needed this :)