Question

GraphQL

Pega OTB has connector wizards for SOAP/SAP/REST integration.

How do we built connectors for GraphQL APIs?

Our current project interfaces with Customer databases via GraphQL APIs

https://graphql.org/

https://blog.apollographql.com/graphql-vs-rest-5d425123e34b

Sincerely,
Sri

***Edited by Moderator Marissa to update SR Details***

Group Tags

Comments

Keep up to date on this post and subscribe to comments

March 12, 2019 - 3:56pm

I am also interested in creating and communicating with GraphQL services using PRPC.

Ideally, a future version of PRPC will have an ootb class for Connect-GraphQL.

Until then, has anyone tried building GraphQL connectors on top of HTTP connectors?

March 24, 2019 - 11:32am

July 19, 2019 - 8:08pm

graphQL is basically a REST with typed parameters.

If you need to access your company internal/or any other graphQL end point, just pre cook  your grapql Queries withe the exact paramaters that you would do if it was a micro service.

for example: let say you have this schema : from apollo.org

directive @cacheControl(
  maxAge: Int
  scope: CacheControlScope
) on FIELD_DEFINITION | OBJECT | INTERFACE
type Book {
  title: String
  author: String
}

enum CacheControlScope {
  PUBLIC
  PRIVATE
}

type Query {
  books: [Book]
}

scalar Upload

then if you want only the list of books. your REST post data would be like this.

 

"query={
  books {
    title
      }
}"

 

in other words, you can make your GraphQL end point compatible with the legacy REST. and serve REST and graphQL clients at the same time.