question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The remote schema use 3rd party rest APIs, please!🙏

See original GitHub issue

it’s very basic and important,we have much old rest APIs and restFul APIs, and we often use 3rd party rest or restful APIs, the APIs is not graphql, if the remote schema can edit body, that’s great!!!

the APIs from other company and not running on our own server, we cannot Convert to graphql or is will cause a lot of bugs, it’s too complicated and heavy!

the APIs like this:

{
    "url": "https://b.dgacel.com.co/crm/so/edOrderProdDtl?MmEwMD=3_b5qGLGovpMIFQok4",
    "headers":{
        "Cookie":"JSESSIONID=187579F31AF43519349F92DF73C07740;FSSBBIl1UgzbN7N8443T=38BZs26UppWli4EPN3c6jG.dzaq;",
        "X-Requested-With":"XMLHttpRequest"
    },
    "body":{
        "prodInstId":12,
        "installArea":"rJjY3KmDUXPQ35aqdp+JSw==",
        "inFrame":["a","b","c"]
    }
}
// -----------------------------------------------------------------------------------------------
{
    "url": "https://apis.g2r3557oe.com",
    "headers":{
        "token":"rshbt5rt45edmlkfm.gklfdmje2343tk5rmhyftsgfdsmfesfdbgfh23y43o54egvfn",
        "Content-Type":" application/json; charset=UTF-8"
    },
    "body":{
        "name":"Sam",
        "gander":"male",
        "age":19,
        "studentID":245120180912887634592,
        "science": false //  default is true
    }
}

I want to use hasura to integrate existing REST APIs and third-party REST APIs.

image

I think other developers also will have this trouble, we usually use a lot of old REST-API from 3rd party SDK, and my company 's APIs, It’s all rest or restful APIs

If I create a remote schema has the body’s field from rest API’s field, this will greatly reduce the workload and unify old API to graphql, I hope that hasura provide such a function, thanks!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Eden-Harriscommented, Apr 16, 2019

@ecthiender @tirumaraiselvan @mnlbox 😢 Yeah, I Kwon, but #1279 is not an elegant and simple way, it is too cumbersome and error-prone, especially when faced with a large number of old APIs. If you write in remote schema , you can guarantee higher performance and quick and easy packaging of these rest APIs, maybe it’s right? Especially in the face of transforming many old programs and integrating third-party service APIs, maybe this is really a good proposal. 🙏 However, thank you for your help.

0reactions
coco98commented, Apr 16, 2019

@Eden-Harris Would love to discuss your use-case in more detail in the meanwhile. I’m @tanmaig on our discord. Please do ping me there! https://discord.gg/hasura

Read more comments on GitHub >

github_iconTop Results From Across the Web

Create a Remote Schema to wrap a REST API with Hasura
A remote schema is an external GraphQL service that can be stitched with Hasura. Adopt GraphQL by wrapping REST APIs within a GraphQL...
Read more >
Calling third-party REST APIs in a Remedy application
You can call third-party REST APIs directly by using a filter having Set Fields action with REST API as a data source. This...
Read more >
node_modules/ajv/README.md ... - PLMlab
Ajv generates code using doT templates to turn JSON Schemas into super-fast validation functions that are efficient for v8 optimization.
Read more >
What is REST API (RESTful API)? - TechTarget
A RESTful API is an architectural style for an application program interface (API) that uses HTTP requests to access and use data. That...
Read more >
ajv - NPM Package Overview - Socket - Socket.dev
Please note: To use Ajv with draft-06 schemas you need to explicitly add the ... full support of remote refs (remote schemas have...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found