Class: BunnyApp::Platform
- Inherits:
-
Object
- Object
- BunnyApp::Platform
- Defined in:
- lib/bunny_app/platform.rb
Class Method Summary collapse
Class Method Details
.create(name:, code:) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/bunny_app/platform.rb', line 16 def self.create(name:, code:) variables = { attributes: { name:, code: } } res = Client.new.query(@platform_create_mutation, variables) raise ResponseError, res['data']['platformCreate']['errors'].join(',') if res['data']['platformCreate']['errors'] res['data']['platformCreate']['platform'] end |