Graphiql: Display error or warning on deprecated fields inside query editor

Created on 16 Jan 2017  路  3Comments  路  Source: graphql/graphiql

Thankfully now we display information about deprecated fields in the docs sidebar, but most people just use autocompletion to write queries. It would be great if there were a way to see inline in the query when you are using a deprecated field so that you don't write new queries that use them.

enhancement help wanted

Most helpful comment

@asiandrummer like a yellow squiggly underline? i'll try to do that, styling can easily be updated later.

All 3 comments

Thanks for the suggestion @stubailo - @1aurabrown also pointed out that typeahead should also contain deprecation information. Deprecated GraphQL syntax is a special one since using it won't block the query execution - maybe a yellow squiggly line would suggest a warning for deprecation. For typeahead entries, showing (DEPRECATED) in the description box would be sufficient.

@asiandrummer thanks. the change to the ui requires a change to codemirror-graphql in order to pass those fields along with the hints in the typeahead.

@asiandrummer like a yellow squiggly underline? i'll try to do that, styling can easily be updated later.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

samrae7 picture samrae7  路  3Comments

felixfbecker picture felixfbecker  路  5Comments

lukaszczapiga picture lukaszczapiga  路  5Comments

jonaskello picture jonaskello  路  4Comments

acao picture acao  路  3Comments