Sha256: 53538e14fd230824a82783b242e283dadc4b7f85758f31c1866f0677ca09e8fa

Contents?: true

Size: 492 Bytes

Versions: 94

Compression:

Stored size: 492 Bytes

Contents

# frozen_string_literal: true
module GraphQL
  class Schema
    class Member
      module HasAstNode
        # If this schema was parsed from a `.graphql` file (or other SDL),
        # this is the AST node that defined this part of the schema.
        def ast_node(new_ast_node = nil)
          if new_ast_node
            @ast_node = new_ast_node
          elsif defined?(@ast_node)
            @ast_node
          else
            nil
          end
        end
      end
    end
  end
end

Version data entries

94 entries across 94 versions & 2 rubygems

Version Path
graphql-1.13.23 lib/graphql/schema/member/has_ast_node.rb
graphql-1.13.22 lib/graphql/schema/member/has_ast_node.rb
graphql-1.13.21 lib/graphql/schema/member/has_ast_node.rb
graphql-1.13.20 lib/graphql/schema/member/has_ast_node.rb
graphql-2.0.17.2 lib/graphql/schema/member/has_ast_node.rb
graphql-2.0.17.1 lib/graphql/schema/member/has_ast_node.rb
graphql-2.0.19 lib/graphql/schema/member/has_ast_node.rb
graphql-2.0.18 lib/graphql/schema/member/has_ast_node.rb
graphql-2.0.17 lib/graphql/schema/member/has_ast_node.rb
graphql-1.13.19 lib/graphql/schema/member/has_ast_node.rb
graphql-1.13.18 lib/graphql/schema/member/has_ast_node.rb
graphql-2.0.16 lib/graphql/schema/member/has_ast_node.rb
graphql-1.13.17 lib/graphql/schema/member/has_ast_node.rb
graphql-2.0.15 lib/graphql/schema/member/has_ast_node.rb
graphql-2.0.14 lib/graphql/schema/member/has_ast_node.rb
graphql-1.13.16 lib/graphql/schema/member/has_ast_node.rb
graphql-2.0.13 lib/graphql/schema/member/has_ast_node.rb
graphql-2.0.12 lib/graphql/schema/member/has_ast_node.rb
graphql-1.13.15 lib/graphql/schema/member/has_ast_node.rb
graphql-2.0.11 lib/graphql/schema/member/has_ast_node.rb