Although standalone applications can provide utility, most software we build must integrate with external third-party systems to provide business value. GitHub integrates with your continuous integration system so that you get feedback on pull requests. Commerce software integrates with warehouse management systems to track inventory.

Gadget comes with built-in connections that let you retrieve and manipulate data held in third-party systems without writing code. Each connection instantly provides a real-time, two-way data sync between your Gadget backend and the third-party system.

Using connections, a Gadget developer can quickly:

  • Listen and react to third-party webhooks
  • Write data back to third-party systems
  • Generate performant reports by avoiding rate limits

Why does Gadget provide connections? 

By providing connections, Gadget has a built-in solution to integrating your app with various third-party systems, so you can start writing your custom code sooner.

Building a reliable integration is difficult and often highly repetitive. Once you get past properly authenticating your app, there are many issues one has to address when talking to the external system. Webhooks are unreliable, so how do I ensure my system always has the most up-to-date data? Communicating over the network is unreliable, so how do I make actions reliable? How do I respond to specific changes in state?

Additionally, some remote APIs can be difficult to model. For example, Shopify products have many variants as child resources. Suppose you want to model products and product variants separately in your app. In that case, you also need to deal with the fact that a product variant being deleted results in a product update payload, with a variants list containing all variants except the one that was deleted.

Connections allow you to siginifcaltly accelerate the development timeline of your application by taking care of all the integration edge-cases that developers commonly run into.

What do connections provide? 

Gadget connections provide everything you need to integrate with external systems reliably. There are three major pieces Gadget provides when installing a connection on your Gadget app:

  • Data modeling: Gadget will provide models with some connections and ensure these models are kept up to date with the remote system through webhooks and background data synchronization.
  • Effects: For third-party systems which provide APIs that allow you to run actions on remote systems, such as sending an email, Gadget will provide effects that allow you to perform those actions easily.
  • Client: When Gadget doesn't do exactly what you need, an authenticated client is available for your custom code effects to use.

Removing a connection 

If you no longer need a connection, you can remove it from the Connections view by selecting "Remove Connection."

Removing a connection will sever communications between Gadget and the connected system. Gadget will not delete any models or records created by the connection, when the connection is removed; any models or records you no longer require can be removed manually.