```dart
const getTodo = 'getTodo';
String graphQLDocument = '''query GetTodo(\$id: ID!) {
  $getTodo(id: \$id) {
    id
    name
  }
}''';
final getTodoRequest = GraphQLRequest<Todo>(
    document: graphQLDocument,
    modelType: Todo.classType,
    variables: <String, String>{'id': someTodoId},
    decodePath: getTodo,
);
```
The `decodePath` specifies which part of the response to deserialize to the `modelType`. You'll need to specify the operation name (as `decodePath`) and `modelType` to deserialize the object at "data.getTodo" successfully into a `Todo` model.

Then, query for the Todo by a todo id:
```dart
Future<void> queryTodo(GraphQLRequest<Todo> getTodoRequest) async {
  final response = await Amplify.API.query(request: getTodoRequest).response;
  print('Response: $response');
}
```
