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

LocalDate when passed as query variable #53

Open
shamresh opened this issue Jan 30, 2019 · 1 comment
Open

LocalDate when passed as query variable #53

shamresh opened this issue Jan 30, 2019 · 1 comment

Comments

@shamresh
Copy link

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.

@shamresh shamresh changed the title LocalDate when passed as query paramenter LocalDate when passed as query variable Jan 30, 2019
@jeggy
Copy link
Contributor

jeggy commented Jan 30, 2019

This has been fixed with: #46
But a new version with this fix hasn't been released yet.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants