---Advertisement---
GraphQL Microservices

GraphQL Interview Question-Answer

By smart_answer13

Updated on:

---Advertisement---

GraphQL Interview Question-Answer Part – 2

Q.1 Which of the following is a feature of GraphQL?

       A. Introspective

       B. Strongly typed

       C. Version free

       D. All the options

Ans : All the options


Q.2 GraphQL was developed and open-sourced by _________.

       A. Apple

       B. Facebook

       C. Google

       D. Microsoft

Ans : Facebook


Q.3 GraphQL APIs are organized in terms of __________.

       A. Endpoints and Types

       B. Fields and Endpoints

       C. Fields and Types

       D. All the options

Ans : Fields and Types


Q.4 Which of the following GraphQL architectures has the database and the GraphQL server integrated on a single node?

       A. Hybrid approach

       B. GraphQL server with existing system

       C. GraphQL server with connected database

       D. All the options

Ans : GraphQL server with connected database


Q.5 GraphQL has __________ endpoint(s).

       A. One

       B. Three

       C. Many

       D. Two

Ans : One


Q.6 Which of the following architectures is useful for the firms that have legacy infrastructure and distinct APIs?

       A. Hybrid approach

       B. GraphQL server with existing system

       C. GraphQL server with connected database

       D. None of the options

Ans : GraphQL server with existing system


Q.7 ______________ helps to retrieve specific information from the server.

       A. Sub fields

       B. Fields

       C. Arguments

       D. Mutations

Ans : Arguments


Q.8 _____________ is generally seen as a contract between the client and the server in GraphQL API.

       A. Mutation

       B. Query

       C. Schema

       D. None of the options

Ans : Schema


Q.9 ______________ allows you to ask the server for the required data.

       A. Queries

       B. Subscriptions

       C. Mutations

       D. None of the options

Ans : Queries


Q.10 GraphQL can be implemented only with Python language.

       A. True

       B. False

Ans : False


Q.11 GraphQL has a feature of querying its own schema.

       A. True

       B. False

Ans : True


Q.12 ______________ is the most basic component of a GraphQL schema.

       A. Field

       B. Object

       C. Types

       D. All the options

Ans : Object


Q.13 ______________ is restricted to a particular set of allowed values.

       A. Enumeration type

       B. Object type

       C. Scalar type

       D. None of the options

Ans : Enumeration type


Q.14 Which of the following is a special root type present for writing the schema of an API?

       A. type Subscription{…}

       B. type Mutation{…}

       C. type Query{…}

       D. All the options

Ans : All the options


Q.15 Fields repetition can be avoided by creating _____________ on the returned type.

       A. Mutations

       B. Aliases

       C. Fragments

       D. All the options

Ans : Fragments


Q.16 The keyword _____________ is used to indicate mutation operation.

       A. Directives

       B. Subscription

       C. Query

       D. Mutation

Ans : Mutation


Q.17 _____________ manipulate the information stored in the backend.

       A. Queries

       B. Subscriptions

       C. Mutations

       D. All the options

Ans : Mutations


Q.18 ______________ requests data from the same fields with different arguments.

       A. Aliases

       B. Connections

       C. Fragments

       D. Nested Fields

Ans : Aliases


Q.19 _____________ helps to distinguish queries from each other.

       A. Nested Fields

       B. Operation names

       C. Aliases

       D. Fragments

Ans : Operation names


Q.20 Complex queries are written using multiple nested fields.

       A. True

       B. False

Ans : True


Q.21 GraphQL is a query language for databases.

       A. True

       B. False

Ans : False


Q.22 ______________ help to inform the important events immediately.

       A. Fragments

       B. Subscriptions

       C. Queries

       D. Mutations

Ans : Subscriptions


Q.23 Which statement about GraphQL servers is true?

       A. A GraphQL server that does not use DataLoader is not a GraphQL Server

       B. A single record is never fetched more than once for a given query

       C. Query fields are resolved depth-first

       D. Resolvers can be defined on a field granularity

Ans : Resolvers can be defined on a field granularity


Q.24 Which of the following clients use GraphQL?

       A. Coursera

       B. Shopify

       C. GitHub

       D. All the options

Ans : All the options


Q.25 How are HTTP requests sent by ApolloClient authenticated?

       A. By attaching an authentication token to the request with dedicated ApolloLink middleware

       B. ApolloClient has nothing to do with authentication

       C. The ApolloClient needs to be instantiated with an authentication token

       D. ApolloClient exposes an extra method called ‘authenticate’ where you can pass an authentication token

Ans : By attaching an authentication token to the request with dedicated ApolloLink middleware


Q.26 What does a GraphQL client usually do before caching the results of a query?

       A. Normalize the data

       B. Validate the query results against the schema

       C. Make the data available in the props of a React component

       D. Call a resolver function

Ans : Normalize the data


Q.27 Which mechanism is used by most tools to discover a GraphQL server’s type system?

       A. IDL

       B. Subscriptions

       C. Introspection

       D. GraphiQL

Ans : Introspection


Q.28 Which of the following statements is true?

       A. GraphQL can only be used together with SQL

       B. GraphQL was invented by Facebook

       C. GraphQL was developed by Netflix and Coursera

       D. GraphQL is a database technology

Ans : GraphQL was invented by Facebook


Q.29 The following strategies are valid ways to defend against abusive or large queries, except _____________.

       A. Maximum query depth

       B. Timeout

       C. Calculating query complexity

       D. Adding more servers

Ans : Adding more servers


Q.30 Directives are preceded by ____________ character.

       A. @

       B. &

       C. #

       D. *

Ans : @


GraphQL Interview Question-Answer Part – 2

smart_answer13

---Advertisement---

Related Post

Zipkin-Jaeger Interview Question-Answer

Q.1 Which is responsible for sending spans to storage?        A. Transport        B. Collector        C. Component        D. ...

Weaveworks Interview Question-Answer

Q.1 Which of the following features offered by WeaveClouds?        A. Observability        B. VCS integration        C. none of the mentioned ...

Vaadin Unplugged Interview Question-Answer

Q.1 Which of the Programming Model is not supported by Vaadin?        A. Browser        B. Client Side        C. Server Side ...

Spring Boot Framework Interview Question-Answer Part – 2

Q.1 The annotation used to import additional configuration classes is ___________.        A. @Import        B. @Include        C. @EnableImport     ...

Leave a Comment