After Party: New Innovations from Apollo!

:tada: After Party: New Innovations from Apollo!

:date: February 19th | 10:45 AM PT | 1:45 PM ET :tada:

We’re offering an exclusive opportunity to our Apollo Community members! Immediately following the New Innovations from Apollo webinar - we’ll continue the conversation at our After Party hosted right here - in the Apollo Community! This is your chance to ask questions to the team, dive deeper into the webinar content or chat about anything else you want to know about topics like AI, APIs, GraphQL and more.

9 Likes

Looking for more Connectors info? :rocket: Try the following:

3 Likes

Thanks for everyone that joined, we learned a lot for our first after party stream! Apologies for the cutoff at the end, I didn’t realize that the ~30s delay and me pressing “End Stream” would cut off abruptly like that.

We cut off us saying “Thank you” from all of us and if you need any help building a connector, feel free to post in our forums here or ping @watson directly!

We’ll work on getting all of the answers for questions posted to have a transcript version of what was in the stream and what we didn’t get to :soon::pray:

I also mentioned som AWS events and wanted to share sign up links:

1 Like

After Party Q&A

See below for all the great After Party Questions we captured.

Q1: What is the difference between a connector and a resolver? (Rich Bennet)

Answer The short answer is that Connectors and Resolvers are conceptually similar, but Connectors are declarative and run directly inside the Apollo Router runtime rather than as a separate service. Connectors do one thing: call your API and transform the result to match your GraphQL schema. You don’t need a separate service or any GraphQL frameworks to implement them.

For more, are docs do a great job with official definitions and tons more info about each:

Q2 - Is Apollo Connector available for free?

Answer Yes! You can get started building Apollo Connectors for free with our new Free plan, available for sign-up today!

The Free plan gives you all the functionality of our previous Enterprise Trial, for up to 3 GraphOS users, and one self-hosted Router instance per variant, capped at 60 operations per minute. There’s no time limit on the Free plan, so you don’t have to worry about running out of time.

Here’s a link to more information on all of Apollo’s pricing plans.

Q3: What if our REST endpoints are not swagger (or OpenAPI) but plain old awful REST? (Lewis Meadows)

Answer Connectors work with the JSON response coming from any REST API/endpoint. You can map your schema to your responses in whatever way works best for you. Using swagger, OpenAPI, etc isn’t required.

Q4: Do Connectors work with REST OpenAPI definitions? (Anonymous)

Answer Today Connectors are not autogenerated from OpenAPI definitions, but it’s on our roadmap. In conversations with customers, we found that many teams don’t have accurate OpenAPI specifications (or don’t trust the ones they have), so we started with a flexible system that works with any HTTP/JSON API.

Q5 How do connectors get auth tokens, (eg oauth) to access the REST service? (Chuck)

Answer The short answer is the same way as you’d do it normally in the Router with a subgraph — either with configuration (from environment variables), passing it through from client headers, or using co-processors!

Explore the following resources to learn more about how Apollo Connectors, REST, and GraphQL work together:

Q6 - Do/will you have examples of using connectors to integrate a rails active record api? (Mark Brouchouch)

Answer We don’t currently, but we encourage you to give writing a connector to do this a try - we think you’ll find it wonderfully straightforward, and fun! Create an account here, and ask a question in the Connectors category if you need a hand with anything.

Q7 I missed the purpose of “…@defer” in the demo, what does it do? (Rich Bennett)

Answer Router-based defer enables incremental delivery of GraphQL responses to clients. So by deferring data that might take longer to retrieve, you can improve the responsiveness of your application by returning the most important data first.

And it’s clients that get to make this decision and the Router just answers the client’s needs.

Connectors works perfectly with defer and you can read more about how to use the defer directive in our documentation:

Q8 Is there an extension for IntelliJ for connectors? (Anonymous)

Answer Yes there is! We’re excited to offer Connectors support in our IntelliJ plugin, as well as our VSCode extension (and we even have VIM support! :joy:).

Q9 With the shift to using a graphql router + connectors, do we still use Apollo Servers? (Anonymous)

Answer Connectors bypass the need to have a GraphQL server like Apollo Server. Though this doesn’t prevent you from using Connectors alongside GraphQL servers.

For example, you might want to use Connectors to open up access to some of your REST APIs, but still want to use a GraphQL server to resolve requests to some other kind of data source, like a database. The Apollo Router takes care of figuring out where requests for your data go when things come in - this is all seamless to developers, they just ask for the data they need, they don’t have to care where it comes from. The Router decides if it’s going to resolve the request for that data using a Connector talking to a REST API/endpoint, or by talking to a GraphQL server like Apollo Server.

Q10 Is there a limitation on which data source a connector may connect to, do you support gRPC APIs?

Answer Connectors currently support any HTTP API which returns JSON data. gRPC APIs can be configured to use a JSON transport. Here are a few resources:

2 Likes