Skip to content
This repository was archived by the owner on May 16, 2019. It is now read-only.
This repository was archived by the owner on May 16, 2019. It is now read-only.

LocalDate when passed as query variable #53

Description

@shamresh

Hi,

If I do

query getNewInventoryQuery($vin: String!, $fromDate: LocalDate!) {

   parts: getInventory(stockNumber :"XXX-2343-1", fromDate: $fromDate){
    		restockDate
    		stockNumber
        parts {
          oem
          addedDate
          manufacturer
          name
        }
  }
}

and the query variable is:

{
  "vin": "4T3BK3BB1CU070903",
  "fromDate": "1999-12-12"
}

I get :

{ "errors": { "message": "Caught ExecutionException: Failed to coerce 1999-12-12 as java.time.LocalDate" } }

However, if I do not pass the LocalDate and hard code it as :

query getNewInventoryQuery($vin: String!, $fromDate: LocalDate!) {

   parts: getInventory(stockNumber :"XXX-2343-1", fromDate: "1999-12-12"){
    		restockDate
    		stockNumber
        parts {
          oem
          addedDate
          manufacturer
          name
        }
  }
}

the query works.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions