The Complete Strapi™ Course with Plugins and Deployment - First Authenticated GraphQL Query

The Complete Strapi™ Course with Plugins and Deployment - First Authenticated GraphQL Query

Assessment

Interactive Video

Information Technology (IT), Architecture

University

Hard

Created by

Quizizz Content

FREE Resource

The video tutorial explains how to make authenticated requests to a GraphQL endpoint by adding an Authorization header with a Bearer token, similar to REST API calls. It demonstrates running a query to retrieve homepage data, handling forbidden errors, and the importance of publishing content to make it accessible. The tutorial concludes with successfully retrieving data, including titles and IDs, and hints at future lessons on nested components and dynamic zones.

Read more

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is required to make an authenticated request to a GraphQL endpoint?

A JSON Web Token

A special API key

An Authorization header with Bearer token

A unique user ID

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What error is expected when running a query without a token?

Bad Request

Forbidden

Not Found

Internal Server Error

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can you resolve a forbidden error when querying a GraphQL endpoint?

By restarting the server

By using a different endpoint

By adding the correct Authorization header

By changing the query type

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What must be done to retrieve unpublished content in a query?

Publish the content

Increase the query timeout

Change the query parameters

Use a different API

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What additional data can be retrieved along with the title in a successful query?

The content type

The ID

The creation date

The author's name