graphlient icon indicating copy to clipboard operation
graphlient copied to clipboard

Add field aliasing support

Open alloy opened this issue 6 years ago • 4 comments

http://graphql.org/learn/queries/#aliases

alloy avatar Oct 04 '17 18:10 alloy

A ✨ Ruby option:

artist do
  for_sale_artworks > artworks(for_sale: true)
  not_for_sale_artworks > artworks(for_sale: false)
end

But may be too magical 😊

alloy avatar Oct 04 '17 19:10 alloy

I was going to suggest a method called alias, but apparently that's a keyword in Ruby.

mikeyhew avatar May 01 '19 21:05 mikeyhew

does @alloy solution still applies? My client throws

Field 'for_sale_artworks' doesn't exist on type 'Artist'

mbajur avatar Feb 02 '21 16:02 mbajur

@mbajur I don't believe this has ever been implemented. PRs are welcomed.

yuki24 avatar Feb 02 '21 23:02 yuki24