This file contains hidden or 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
import SwiftUI | |
public struct ScrollViewWrapper<Content: View>: UIViewRepresentable { | |
@Binding var contentOffset: CGPoint | |
let content: () -> Content | |
public init(contentOffset: Binding<CGPoint>, @ViewBuilder _ content: @escaping () -> Content) { | |
self._contentOffset = contentOffset | |
self.content = content | |
} |
This file contains hidden or 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 com.example.demo.graphql.input | |
data class PersonInput( | |
val name: String | |
) |
This file contains hidden or 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 com.example.demo.graphql | |
import com.coxautodev.graphql.tools.GraphQLMutationResolver | |
import com.example.demo.dao.PersonDao | |
import com.example.demo.data.Person | |
import com.example.demo.graphql.input.PersonInput | |
import org.springframework.stereotype.Component | |
@Component | |
class Mutation( |
This file contains hidden or 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 com.example.demo.dao | |
import com.example.demo.repository.PersonRepository | |
import org.springframework.stereotype.Component | |
@Component | |
class PersonDao( | |
private val personRepository: PersonRepository | |
) { | |
fun getPersonById(id: String) = |
This file contains hidden or 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 com.example.demo.graphql | |
import com.coxautodev.graphql.tools.GraphQLQueryResolver | |
import org.springframework.stereotype.Component | |
@Component | |
class Query: GraphQLQueryResolver { | |
fun version() = "1.0.0" | |
} |
This file contains hidden or 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 Query { | |
# The API Version | |
version : String! | |
} |
This file contains hidden or 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 Person { | |
id: ID! | |
name: String! | |
} |
This file contains hidden or 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 Query { | |
# The API Version | |
version: String! | |
# Get person with ID | |
person(id: ID!): Person | |
# Get persons by name | |
personsByName(name: String!): [Person] | |
} |
This file contains hidden or 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 com.example.demo.graphql.query | |
import com.coxautodev.graphql.tools.GraphQLQueryResolver | |
import com.example.demo.dao.PersonDao | |
import com.example.demo.data.Person | |
import org.springframework.stereotype.Component | |
@Component | |
class PersonQueryResolver( | |
private val personDao: PersonDao |
This file contains hidden or 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 com.example.demo.dao | |
import com.example.demo.repository.PersonRepository | |
import org.springframework.stereotype.Component | |
@Component | |
class PersonDao( | |
private val personRepository: PersonRepository | |
) { | |
fun getPersonById(id: String) = |
NewerOlder