def build_query
      GraphQL.parse(BASE_QUERY).tap do |d_ast|
        selections = d_ast.definitions.first.selections.first.selections

        node_types.each do |type|
          selections << inline_fragment_ast(type) if include?(type)
        end

        selections.compact!
      end
    end
def build_query
      GraphQL.parse(BASE_QUERY).tap do |d_ast|
        selections = d_ast.definitions.first.selections.first.selections

        node_types.each do |type|
          selections << inline_fragment_ast(type) if include?(type)
        end

        selections.compact!
      end
    end
Build a query for our relay schema that selects an inline fragment for
 every node type. For every inline fragment, we select the ID of every node
 field and connection.

 Returns a GraphQL::Language::Nodes::Document instance.