fix: replace DateTime with Date and add gql resolver date name
This commit is contained in:
parent
bad3d291ca
commit
0ae8c691c2
5 changed files with 13 additions and 21 deletions
|
|
@ -1,6 +1,8 @@
|
||||||
const { GraphQLDateTime } = require('graphql-iso-date')
|
const { GraphQLDateTime } = require('graphql-iso-date')
|
||||||
const { GraphQLJSON, GraphQLJSONObject } = require('graphql-type-json')
|
const { GraphQLJSON, GraphQLJSONObject } = require('graphql-type-json')
|
||||||
|
|
||||||
|
GraphQLDateTime.name = 'Date'
|
||||||
|
|
||||||
const resolvers = {
|
const resolvers = {
|
||||||
JSON: GraphQLJSON,
|
JSON: GraphQLJSON,
|
||||||
JSONObject: GraphQLJSONObject,
|
JSONObject: GraphQLJSONObject,
|
||||||
|
|
|
||||||
|
|
@ -37,8 +37,8 @@ const GET_MACHINE_LOGS_CSV = gql`
|
||||||
query MachineLogs(
|
query MachineLogs(
|
||||||
$deviceId: ID!
|
$deviceId: ID!
|
||||||
$limit: Int
|
$limit: Int
|
||||||
$from: DateTime
|
$from: Date
|
||||||
$until: DateTime
|
$until: Date
|
||||||
$timezone: String
|
$timezone: String
|
||||||
) {
|
) {
|
||||||
machineLogsCsv(
|
machineLogsCsv(
|
||||||
|
|
@ -52,12 +52,7 @@ const GET_MACHINE_LOGS_CSV = gql`
|
||||||
`
|
`
|
||||||
|
|
||||||
const GET_MACHINE_LOGS = gql`
|
const GET_MACHINE_LOGS = gql`
|
||||||
query MachineLogs(
|
query MachineLogs($deviceId: ID!, $limit: Int, $from: Date, $until: Date) {
|
||||||
$deviceId: ID!
|
|
||||||
$limit: Int
|
|
||||||
$from: DateTime
|
|
||||||
$until: DateTime
|
|
||||||
) {
|
|
||||||
machineLogs(
|
machineLogs(
|
||||||
deviceId: $deviceId
|
deviceId: $deviceId
|
||||||
limit: $limit
|
limit: $limit
|
||||||
|
|
|
||||||
|
|
@ -57,12 +57,7 @@ const SHOW_ALL = { code: 'SHOW_ALL', display: 'Show all' }
|
||||||
const NUM_LOG_RESULTS = 500
|
const NUM_LOG_RESULTS = 500
|
||||||
|
|
||||||
const GET_CSV = gql`
|
const GET_CSV = gql`
|
||||||
query ServerData(
|
query ServerData($limit: Int, $from: Date, $until: Date, $timezone: String) {
|
||||||
$limit: Int
|
|
||||||
$from: DateTime
|
|
||||||
$until: DateTime
|
|
||||||
$timezone: String
|
|
||||||
) {
|
|
||||||
serverLogsCsv(
|
serverLogsCsv(
|
||||||
limit: $limit
|
limit: $limit
|
||||||
from: $from
|
from: $from
|
||||||
|
|
@ -73,7 +68,7 @@ const GET_CSV = gql`
|
||||||
`
|
`
|
||||||
|
|
||||||
const GET_SERVER_DATA = gql`
|
const GET_SERVER_DATA = gql`
|
||||||
query ServerData($limit: Int, $from: DateTime, $until: DateTime) {
|
query ServerData($limit: Int, $from: Date, $until: Date) {
|
||||||
serverVersion
|
serverVersion
|
||||||
uptime {
|
uptime {
|
||||||
name
|
name
|
||||||
|
|
|
||||||
|
|
@ -39,8 +39,8 @@ const TX_SUMMARY = gql`
|
||||||
$txId: ID!
|
$txId: ID!
|
||||||
$deviceId: ID!
|
$deviceId: ID!
|
||||||
$limit: Int
|
$limit: Int
|
||||||
$from: DateTime
|
$from: Date
|
||||||
$until: DateTime
|
$until: Date
|
||||||
$txClass: String
|
$txClass: String
|
||||||
$timezone: String
|
$timezone: String
|
||||||
) {
|
) {
|
||||||
|
|
|
||||||
|
|
@ -34,8 +34,8 @@ const GET_DATA = gql`
|
||||||
const GET_TRANSACTIONS_CSV = gql`
|
const GET_TRANSACTIONS_CSV = gql`
|
||||||
query transactions(
|
query transactions(
|
||||||
$limit: Int
|
$limit: Int
|
||||||
$from: DateTime
|
$from: Date
|
||||||
$until: DateTime
|
$until: Date
|
||||||
$timezone: String
|
$timezone: String
|
||||||
) {
|
) {
|
||||||
transactionsCsv(
|
transactionsCsv(
|
||||||
|
|
@ -59,8 +59,8 @@ const GET_TRANSACTION_FILTERS = gql`
|
||||||
const GET_TRANSACTIONS = gql`
|
const GET_TRANSACTIONS = gql`
|
||||||
query transactions(
|
query transactions(
|
||||||
$limit: Int
|
$limit: Int
|
||||||
$from: DateTime
|
$from: Date
|
||||||
$until: DateTime
|
$until: Date
|
||||||
$txClass: String
|
$txClass: String
|
||||||
$machineName: String
|
$machineName: String
|
||||||
$customerName: String
|
$customerName: String
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue