I need some help retrieving JSON data via GraphQl.
When testing the connection in TimeXtender, I got a "Connection OK" message.
After Synchronizing Data Source in TimeXtender an error message is displayed :Â
 System.Data.CData.GraphQL.GraphQLDataReader ExecuteDataReader(System.Data.CommandBehavior)
 Â500] Could not execute the specified command: The defined query is null. : "UserViews"."query"
 System.Data.CData.GraphQL.GraphQLDataReader ExecuteDataReader(System.Data.CommandBehavior)
 /500] Could not execute the specified command: The defined query is null. : "UserViews"."variables"
==========================================================================================================================
We received the following connection string from our IT department
--------------------------------------------------------------------------------------------------------------------------
curl --location 'https://xxxxxxxxxx.com/um/users/graphql' \
--header 'accept: */*' \
--header 'Referer: http://localhost:7000/um' \
--header 'User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.113 Safari/537.36' \
--header 'content-type: application/json' \
--header 'Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
--data '{"query":"query ModifiedUsers($lastCheck: String!, $from: Int = 0, $size: Int = 20) {modifiedUsers(lastCheck: $lastCheck, from: $from, size: $size)\r\n{\r\n     users {\r\n         id\r\n         login\r\n         createdBy\r\n         updatedBy\r\n         created\r\n         updated\r\n         principalADName\r\n         systemAccount\r\n         authType\r\n         userDetail {\r\n           firstName\r\n           lastName\r\n           email\r\n           language {\r\n              id\r\n              name       }\r\n           country {  \r\n              id\r\n              name\r\n           }\r\n         }\r\n         userApplicationAttributesValues {\r\n           userApplicationAttributeId\r\n           value\r\n         }\r\n         authorizations {\r\n           applicationInstance {\r\n               id\r\n               name\r\n           }\r\n           applicationHierarchies {\r\n             applicationHierarchy {\r\n               id\r\n               label\r\n                       }\r\n           attributeValues {\r\n             id\r\n             value\r\n             valueName\r\n             parentId\r\n             deleted\r\n           }\r\n           }\r\n\r\n          }\r\n         }, total\r\n         }\r\n         }\r\n","variables":{"lastCheck":"2025-04-01T10:15:30Z","from":0,"size":10}}'
==========================================================================================================================
TimeXtender 20.10.52.64 (on prem)
--------------------------------------------------------------------------------------------------------------------------
Connector:
CData ADO.NET Provider for GraphQl 2023 (23.0.8669.0)
Settings:
URL:Â
 https://xxxxxxxxxx.com/um/users/graphql
Custom headers:Â
 accept: */*
 Referer: http://localhost:7000/um
 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.113 Safari/537.36
 content-type: application/json
 Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
User Defined Views:
 F:\umUser-Agent.json
  {"query":"query ModifiedUsers($lastCheck: String!, $from: Int = 0, $size: Int = 20) {\n  modifiedUsers(lastCheck: $lastCheck, from: $from, size: $size) {\n   users {\n    id\n    login\n    createdBy\n    updatedBy\n    created\n    updated\n    principalADName\n    systemAccount\n    authType\n    userDetail {\n     firstName\n     lastName\n     email\n     language {\n      id\n      name\n     }\n     country {\n      id\n      name\n     }\n    }\n    userApplicationAttributesValues {\n     userApplicationAttributeId\n     value\n    }\n    authorizations {\n     applicationInstance {\n      id\n      name\n     }\n     applicationHierarchies {\n      applicationHierarchy {\n       id\n       label\n      }\n      attributeValues {\n       id\n       value\n       valueName\n       parentId\n       deleted\n      }\n     }\n    }\n   }\n   total\n  }\n}","variables":"{\n  \"lastCheck\": \"2025-02-04T17:10:09Z\",\n  \"from\": 0,\n  \"size\": 10\n}"}
==========================================================================================================================
In Bruno the connection can be setup and the data can be retrieved from the system without errors.
--------------------------------------------------------------------------------------------------------------------------
Query:
 query ModifiedUsers($lastCheck: String!, $from: Int = 0, $size: Int = 20) {
  modifiedUsers(lastCheck: $lastCheck, from: $from, size: $size) {
   users {
    id
    login
    createdBy
    updatedBy
    created
    updated
    principalADName
    systemAccount
    authType
    userDetail {
     firstName
     lastName
     email
     language {
      id
      name
     }
     country {
      id
      name
     }
    }
    userApplicationAttributesValues {
     userApplicationAttributeId
     value
    }
    authorizations {
     applicationInstance {
      id
      name
     }
     applicationHierarchies {
      applicationHierarchy {
       id
       label
      }
      attributeValues {
       id
       value
       valueName
       parentId
       deleted
        }
     }
    }
   }
   total
  }
 }
Variables
 {
  "lastCheck": "2025-02-04T17:10:09Z",
  "from": 0,
  "size": 10
 }
Headers
--header 'accept: */*'
--header 'Referer: http://localhost:7000/um'
--header 'User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.113 Safari/537.36'
--header 'content-type: application/json'
--header 'Authorization: Bearer xxxxxxxxxxxxxxx
--------------------------------------------------------------------------------------------------------------------------
Can somebody advise, please?
Â

Â