I am new to GraphQl. I would like to implement the Persistent query support for my API. I want to know whether we can achieve it using GraphQL Java. We are not using apolo or any other third party libraries.
Would like to know , how can i implement this support in GraphQL Java .
Lets say client send me a query , i would like to persist it and needs to return a hash for it
Then clients can call my API using this Persisted query hash.
Thanks in Advanace
Related
I'm trying to build the architecture for a Power BI custom data connector, that will consume a GraphQL API. I'm currently thinking about 2 approaches;
Creating a wrapper REST layer, to avoid having to deal with GraphQl in the custom data connector
Consuming the GraphQl API directly in the custom data connector.
Is option 2 possible at all, i.e. can you make GraphQl requests with the M language?
I would like to know how to retreive data using the GraphQl api service and NOT to create the API.
You can use a library like https://pypi.org/project/python-graphql-client/ for that.
Basically just look up 'python graphql request', it's not django-specific.
Apologies as I am new to the webservice space. I would like to ask some guidance on how to create a webservice that will receive data from a mobile app (XML or JSON). It will just be a simple call and Inwould need the data to be inserted to our database. I can manage to deal with the DB and the actual flow and my issue is more on how to create the actual webservice from Mule. and thought examples and comment will be appreciated.
Thanks Again
Creating web-services in Mule is pretty easy to implement and start consuming.
You can go through these links to give you a good headstart:
https://docs.mulesoft.com/mule-user-guide/v/3.7/building-web-services-with-cxf
And you can play with this project:
https://github.com/marcotello/MuleESB/tree/master/simplecxfservice
However, as you mention you know something about the mule components and flows, you'll have to do transformation of your XML/JSON input received from the mobile App to be able to be saved in Database properly.
To accept requests from mobile applications - create light weight rest APIs that consume JSON payload over the http protocol.
There are various frameworks to create rest APIs. To develop rest APIs using mule follow:
https://docs.mulesoft.com/mule-user-guide/v/3.7/rest-api-examples
Once you create a rest API, use a JSON-Object transformer with a return type of java.util.map to access each of the fields in the JSON payload.
Check out the available transformers at the below mentioned link.
https://docs.mulesoft.com/mule-user-guide/v/3.7/transformers
My requirement is - I have an application and need to get product details from amazon, ebay & few more websites for a product. Please let me know the process for getting the product info & also let me know how could i achieve this using C/C++ language. Does amazon support soap still? some where i saw its not supported. If soap is not supported then whats the next alternative?
You can use eBay API, and amazon API, and if you want to compare data and categories between the two (amazon and eBay), you can Try using http://www.ecommerceapi.org
it's an API that combine between them
For example if you have one categoryId of eBay, Ecommerceapi can tell you what is the match for it in amazon
What ever you choose depends on your requirements of the project, API is simple technology that allows you to query the source over http.
This is actually a design question.
I'm wondering if Spring3.0 REST web services that carries JSON payload provide some kind of data contract similar to traditional web services which follows contract-first design.
I know that JSON has schema similar to XSD but where does it fits in spring ?
Background:
I consider using json as the payload of a client server architecture project where the client is .NET based application and data contract should provide a way to handle multiple versions of the client. The client should be able to post data structures to the server.
Or maybe I should take a schema-less approach and use "Simple Data Binding" which is similar to XmlAnyElement?
The "contract" with "regular" web-services is defined in WSDL files (which include XSDs). With RESTful services these files are called WADL. And spring-mvc does not have support for generating WADLs. (JAX-RS implementations have).
But even if if did, RESTful services are considered more "dynamic" and they don't need to be fixed like that. For example take a look at Facebook's and twitter's REST APIs. They don't provide WADLs or JSON schemas. They provide some free-form documentation of their services. That should be sufficient.
If clients should be enabled to mock the services for unit testing the client (and actually they should), the services should provide a contract. Free form documentation is not a reliable base for testing, because it leaves space for misunderstanding, while contracts don't.
JSON Schema and Hyper-Schema are JSON Schema formats for specifying content and content negotiation.
I have been working on a HATEOAS (Hypermedia as the engine of application state) API, using JSON Hyper Schema.
You can go to the URL below, browse around, register, login and do some actions.
Check it out, here:
http://direct.psprt.com:8081/
I also open sourced my actual API code thus far:
http://bpanahij.github.io/passportedu_schema/
Feel free to take a look, borrow, and comment.
Also, check out the Javascript JSON-Hyper-Schema client. It dynamically builds an HTML client app using Angular, by parsing the Schema provided at a given resources endpoint with the OPTIONS method.
https://github.com/bpanahij/passportedu_schema/tree/master/client