graphql-kit / graphql-voyager

🛰️ Represent any GraphQL API as an interactive graph
https://graphql-kit.com/graphql-voyager/
MIT License
7.7k stars 504 forks source link

feature: ability to copy field lists #57

Open peet86 opened 6 years ago

peet86 commented 6 years ago

Feature:
copy to clipboard functionality (for the field list)

While you develop queries on the frontend for a GraphQL endpoint it would be handy to be able to copy field names directly from voyager to your queries..
At the moment this is painful because of the svg rendering.

Proposed solution: A "copy button" (small clipboard icon in the top right corner of the boxes) which copies all the fields to the clipboard when the user clicks on it.

The copied text would look like this (simple list with line breaks): name description whateverfield

I'm ready to jump into the implementation if the main contributors agree..

IvanGoncharov commented 6 years ago

A "copy button" (small clipboard icon in the top right corner of the boxes) which copies all the fields to the clipboard when the user clicks on it.

@peet86 We trying to keep graph view as clean as possible. How about adding it to the left panel, on the right side of fields? image

peet86 commented 6 years ago

I'm fine with that place too. PR is coming soon!

IvanGoncharov commented 6 years ago

@peet86 Looking forward to your PR!