I'm building a Typescript client that should be able to talk to multiple version of an API.
For example, there is a type User and there are 2 version: v0.1 and v0.2. In version v0.2 there is a new field on the User type called address.
As a a client of the API, I want to query the User type, but use the same query to talk to both version of the API. What I expect is that API v0.1 will return null for this new property.
Is there a way to do this? At the moment I getting this error:
GraphQL error: Field 'address' doesn't exist on type 'User'
If it's not possible, does that mean that for every change to the API, if a client would like to be backward compatible, it needs to store different schema for each version?
Related
The issue actually is regarding PowerAutomate (Web version). I am trying to create a custom Github connector as the existing one lacks multiple actions that was needed for my workflow. I setup a simple Get organisation teams API and when I test this action in the builder interface of custom
connector, it works like a charm!!
However when I try to use the same action in a Flow, I encounter the following error:
'The API operation 'GetOrganizationTeams' requires the property 'body/0/parent' to be of type 'String' but is of type 'Object'.
The API documentation for Get Teams can be found here. It is a simple GET request so I don't really know why is the body parameter expected during the API operation.
I tried editing it through the Swagger docs as well, but every time it is returning the same error. Can someone guide me as to what is the exact issue and how can I resolve it?
yesterday we upgraded our d365 v8.x to v9.x, after that all of our web APIs calls failing.
it's throwing the following error.
A resource with type 'Microsoft.Dynamics.CRM.incident' was found, but it is not assignable to the expected type 'Microsoft.Dynamics.CRM.customentity'. The type specified in the resource must be equal to either the expected type or a derived type.
I am using d365 web API with OData and this error is coming when we are trying to execute fetchxml using webapi.
I've been exploring Graphql for a project and I'm fairly new to it. I came across Relay JS by Facebook. It has a specification on how schema should be defined. My concern with this specification is it's somewhat tied to a JS framework.
Are there other specifications for defining Graphql schema?
There are no standards for creating GraphQL schemas!
Relay is the only GraphQL client right now that is opinionated about what your GraphQL Schema should look like, but I still wouldn't call it a standard. With all other clients (like Apollo or Lokka) the schema can be designed in any way you like!
For inspiration, you might want to take a look at how we design the GraphQL API at Graphcool. We're providing two different APIs:
Relay API: Follows the requirements of Relay
Simple API: Basic CRUD capabilities for each type in your data model
You can additionally include capabilities like ordering or filtering in the API.
it all depends on the server. If you dont need relay (like in my case) i have a custom scheme mapping to mysql db.
You are free to define your own scheme as long as each field is a graphql field
According to the DirectLine API documentation, the channelData field in the message object should be a string:
http://docs.botframework.com/sdkreference/restapi-directline/#!/Conversations/Conversations_GetMessages
It used to be the case but since yesterday the API returns a JSON object.
Is this API versioned? It would help to be able to specify a version in the headers or the URL to avoid this kind of breaking change in the future.
No, the API is not versioned, but we will add this so you can control it.
I have read this document "http://jaydata.org/blog/how-to-use-jaydata-with-asp.net-web-api---i" and it shows a very clear and simple way to user web api odata, but in this example, all the data types are defined manually, and I read the words from the document
"The ASP.NET Web API provider does not use server generated metadata to setup the client. You need to provide the JayData library with some information about the data types your about to deal with. This at the moment you can only do manually. Version 1.2.7 of JayData brings Visual Studio development time support for autogenerating the client environment."
Currently, the version 1.2.7.1 is released, but I can't find any information that how to use some tools from jaydata to auto generate these data types.
Is there any document for this?
Yes, we promised it and we did a proof of concept but nobody has asked about it since that post, you're the first, so we think that our current users are happy with either creating the model manually or using WebAPI with oData where the model can be built either dynamically from $metadata or statically with JaySvcUtil.
I can not promise any date when we'll release it.
Can't you just use WebAPI with oData ?