Sha256: f31ad0e3799df03a531ec027c3d4e0af9ea0bee8ae58bf2837f8bcfd0ab66361

Contents?: true

Size: 825 Bytes

Versions: 6

Compression:

Stored size: 825 Bytes

Contents

# frozen_string_literal: true

# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
# ! The following examples are used together with
# ! https://github.com/sushie1984/rails-graphql-server
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

uri = 'http://rails-graphql-server.herokuapp.com/api/graphql'
GraphqlConnector.configure do |config|
  config.add_server(name: 'RailsGraphqlServer', uri: uri, headers: {})
end

department_input = { attributes: { name: 'One', location: 'Berlin' } }
return_fields = ['department': ['id', 'name', 'employees' => ['yearlySalary']]]
GraphqlConnector::RailsGraphqlServer.mutation('createDepartment',
                                              { input: department_input },
                                              return_fields)

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
graphql_connector-2.0.0 examples/mutation_examples.rb
graphql_connector-1.4.0 examples/mutation_examples.rb
graphql_connector-1.3.1 examples/mutation_examples.rb
graphql_connector-1.3.0 examples/mutation_examples.rb
graphql_connector-1.2.1 examples/mutation_examples.rb
graphql_connector-1.2.0 examples/mutation_examples.rb