How do I set up a connector for Lumar which uses GraphQL?

I'm trying to build a connector for Lumar(formerly Deepcrawl) but I am stuck. I've found my way to the custom connector in DOMO but from there I am lost. I have Lumar's API documentation( https://api-docs.lumar.io/docs/ but I'm not a programmer by trade and no idea how to translate that into the custom connector. Any help would be greatly appreciated.

Tagged:

Best Answer

  • GrantSmith
    GrantSmith Coach
    Answer ✓

    There's three steps to configuring GraphQL

    1. Describe your data (schema)
    2. Ask for what you want (query)
    3. Process your data

    Underneath the hood GraphQL is just like another API where you format a request, send your request and then process the data you get back from that request. The only difference is that you're defining what that data should look like rather than having the API tell you what the data looks like.

    I'd recommend starting with https://graphql.org/ to understand how the structure of your requests should be. Once you have that understood you can follow the developer.domo.com documentation for custom connectors to do authentication and do your requests.

    Alternatively you can have a consultant write the custom connector for you.

    **Was this post helpful? Click Agree or Like below**
    **Did this solve your problem? Accept it as a solution!**

Answers

  • GrantSmith
    GrantSmith Coach
    Answer ✓

    There's three steps to configuring GraphQL

    1. Describe your data (schema)
    2. Ask for what you want (query)
    3. Process your data

    Underneath the hood GraphQL is just like another API where you format a request, send your request and then process the data you get back from that request. The only difference is that you're defining what that data should look like rather than having the API tell you what the data looks like.

    I'd recommend starting with https://graphql.org/ to understand how the structure of your requests should be. Once you have that understood you can follow the developer.domo.com documentation for custom connectors to do authentication and do your requests.

    Alternatively you can have a consultant write the custom connector for you.

    **Was this post helpful? Click Agree or Like below**
    **Did this solve your problem? Accept it as a solution!**
  • dkonig
    dkonig Member
    edited May 2023

    Ok. I'll need to read through that. If I understand this then I would need to create multiple connectors depending on the data I need? And what language do I use?

  • You wouldn't necessarily need to create separate connectors but define different reports within your connector to allow users to select and handle those selections in your code to call the correct endpoint.

    **Was this post helpful? Click Agree or Like below**
    **Did this solve your problem? Accept it as a solution!**
  • dkonig
    dkonig Member

    Which language should I be using to write this connector?

  • Custom Domo Connectors are written in the ES5 version of JavaScript.

    **Was this post helpful? Click Agree or Like below**
    **Did this solve your problem? Accept it as a solution!**
  • RobB
    RobB Domo Employee

    @user029082, You can also start by trying some things in Postman. Postman has a GraphQL client that could return to you your schema. Their demo in their documenation shows that and I tried it with my GraphQL API and it returned it to me. It's a good way to get familiar. But that's not all.

    Postman's documentation shows how to make a request to a GraphQL API using the standard HTTP or Curl requests. I think the best solution they give is to write the query using JSON in the body . It's a little tricky at first, but I was able to muddle through it and create syntax that is compatible with Domo's No-Code JSON connector. I used the OAuth version of this connector and retrieved the data I was seeking. I will be building a fair number of these for a project. But the nice thing is that I didn't have to build a new connector.

    https://learning.postman.com/labs/postman-api-client/graphql-client/first-graphql-request/

    https://learning.postman.com/docs/sending-requests/graphql/graphql-http/

  • dkonig
    dkonig Member

    I haven't circled back to this yet but that sounds like an option. I was also going to give Chat GPT a try and see what it can whip up for me.