Learn more  » Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Bower components Debian packages RPM packages NuGet packages

skava / babel-plugin-transform-optimize-graphql   js

Repository URL to install this package:

Version: 0.0.2 

  README.md

babel-plugin-transform-optimize-graphql

example

query StoreLocatorQuery($latitude: Float!, $longitude: Float!) {
  storeLocator(latitude: $latitude, longitude: $longitude) {
    type
    offset
    limit
    storeinfo {
      identifier
      country
      distance
      city
      address1
      latitude
      additionalinfo {
        label
        value
      }
      zipcode
      altidentifier
      phone
      name
      state
      distanceunit
      email
      longitude
      workinghours {
        opentime
        closetime
        day
        openforbussiness
      }
    }
  }
}

=>

storeLocator(latitude: $latitude, longitude: $longitude) { type offset limit storeinfo { identifier country distance city address1 latitude additionalinfo { label value } zipcode altidentifier phone name state distanceunit email longitude workinghours { opentime closetime day openforbussiness } }  }
mutation RegisterGuest {
  registerGuest {
    responseCode
    type
    properties {
      state {
        statuscode
        starttime
        status
      }
    }
    cookies
  }
}

=>

mutation RegisterGuest { registerGuest { responseCode type properties { state { statuscode starttime status } } cookies }}