This worksheet provides a well-structured list of essential Git commands along with their descriptions and practical usage examples specifically for GitHub workflows.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package io.github.susimsek.springdatademo.config; | |
import java.time.Clock; | |
import java.time.Instant; | |
import java.util.Optional; | |
import lombok.extern.slf4j.Slf4j; | |
import org.springframework.context.annotation.Bean; | |
import org.springframework.context.annotation.Configuration; | |
import org.springframework.data.auditing.DateTimeProvider; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const ProductOverview = () => { | |
const { id } = useParams(); | |
const { loading, data, error } = useProductAndReviewsQuery({ | |
variables: { | |
id | |
}, | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
query ProductAndReviews($id: ID!) { | |
product(id: $id) { | |
id | |
name | |
description, | |
reviews { | |
id, | |
text, | |
starRating | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
overwrite: true | |
schema: "http://localhost:4000" | |
documents: "src/**/!(*.d).{ts,tsx,graphql}" | |
generates: | |
src/generated/graphql-types.ts: | |
plugins: | |
- "typescript" | |
- "typescript-operations" | |
- "typescript-react-apollo" | |
config: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"data": { | |
"product": { | |
"id": "1", | |
"name": "Saturn V", | |
"description": "The Original Super Heavy-Lift Rocket!", | |
"createdDate": "2022-08-27T13:01:54+03:00", | |
"reviews": [ | |
{ | |
"id": "1020", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
query Products { | |
product(id: 1) { | |
id | |
name | |
description, | |
createdDate, | |
reviews{ | |
id, | |
text, | |
starRating |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Controller | |
class ReviewController( | |
private val reviewService: ReviewService | |
) { | |
@BatchMapping | |
fun reviews(products: MutableList<Product>): Mono<Map<Product, List<Review>>> { | |
val productIds = products.map {it.id}.toMutableList() | |
val result = reviewService.getReviewsByProductIdsIn(productIds) | |
return result |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Product @key(fields: "id") @extends { | |
id: ID! @external | |
reviews: [Review!]! | |
} | |
type Review { | |
id: ID!, | |
text: String | |
starRating: Int! | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scalar OffsetDateTime | |
type Query { | |
product(id: ID!): Product | |
products: [Product!]! | |
} | |
type Product @key(fields: "id") { | |
id: ID! | |
name: String! |
NewerOlder