Below are general senior level full stack developer Q&As.
List some issues within RESTful APIs that GraphQL attempts to solve.
export function login(loginHandle, password) { | |
return { | |
types: [LOGIN_REQUEST, LOGIN_SUCCESS, LOGIN_FAILURE], | |
promise: (api) => api.post('/auth/login', { login: loginHandle, password }).then(response => { | |
setAuthCookie(response.token); // side effect pre success dispatch | |
return response; | |
}), | |
then: (response) => { | |
postLoginRedirect(browserHistory.push, response.user, response.organisation); // side effect post success dispatch | |
}, |
<?php | |
namespace Cinema\Cast; | |
class CerseiLannister | |
{ | |
private string $name = 'Cersei Lannister'; | |
private JoannaLannister $child; |
// addNumbers.js | |
import calculator from 'calculator'; | |
export default function addNumbers(a, b) { | |
return calculator.add(a, b); | |
} | |
// addNumbers.spec.js |
import React, { Component, PropTypes } from 'react'; | |
import { reduxForm, Field } from 'redux-form'; | |
export class CreateUser extends Component { | |
static propTypes = { | |
createUser: PropTypes.func.isRequired, | |
initialValues: PropTypes.object, | |
submitting: PropTypes.bool.isRequired, | |
invalid: PropTypes.bool.isRequired, |
<div style="height: 700px; position: relative; overflow-y: hidden;"> | |
<div | |
style=" | |
height: 46px; | |
width: 150px; | |
position: absolute; | |
background: #536978; | |
z-index: 9999; | |
right: 5px; | |
" |
<?php | |
if ( !function_exists( 'is_rest' ) ) { | |
/** | |
* Checks if the current request is a WP REST API request. | |
* | |
* Case #1: After WP_REST_Request initialisation | |
* Case #2: Support "plain" permalink settings | |
* Case #3: It can happen that WP_Rewrite is not yet initialized, | |
* so do this (wp-settings.php) |
<?php | |
namespace EthicalJobs\Foundation\Storage; | |
use Illuminate\Support\Collection; | |
interface Repository | |
{ | |
/** | |
* Find a model by its id |
import React from 'react'; | |
window.__state = [ | |
{ name: 'Jaime Lannister', age: 42, avatar: '//api.adorable.io/avatars/134/jaime@adorable.png' }, | |
{ name: 'Cersei Lannister', age: 37, avatar: '//api.adorable.io/avatars/134/cersei@adorable.png' }, | |
{ name: 'Joanna Lannister', age: 16, avatar: '//api.adorable.io/avatars/134/joanna@adorable.png' }, | |
]; | |
// Create react component(s) to display a list of Lannister family members |