File: fragment_definition.rb

package info (click to toggle)
ruby-graphql-client 0.18.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 252 kB
  • sloc: ruby: 1,878; makefile: 4
file content (18 lines) | stat: -rw-r--r-- 375 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# frozen_string_literal: true

require "graphql/client/definition"

module GraphQL
  class Client
    # Specific fragment definition subtype.
    class FragmentDefinition < Definition
      def new(obj, *args)
        if obj.is_a?(Hash)
          raise TypeError, "constructing fragment wrapper from Hash is deprecated"
        end

        super
      end
    end
  end
end