-
Hi there, I want to use BackgroundThere are two reason why I prefer
Example for 2.: module Queries
class PostsQuery < BaseQuery
type [Types::PostType, { null: true }], null: false
# ~~~~~~~~~~~~~~~
def resolve
Post.all
end
end
end |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Yes, that's a safe assumption. Under the hood, GraphQL-Ruby always filters the total set of types and fields into a limited set of visible types and fields. (When no |
Beta Was this translation helpful? Give feedback.
Yes, that's a safe assumption. Under the hood, GraphQL-Ruby always filters the total set of types and fields into a limited set of visible types and fields. (When no
visible?
methods are implemented, the total set equals the limited set.) That limited set is then used for all of query execution.